Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Alert By Clicking On A Link


Is it possible to set a javascript alert before executing a php script when a hyperlink is clicked. i.e. user clicks hyperlink "delete" to execute delete.php?task=del&id=2




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Is There A Way To Pass A Form By Clicking On A Link
I was wondering if it's possible for me to create a form where the user can submit the form by clicking on a hyperlink instead of clicking on a button to pass the data. Is this possible?

Changing Variables By Clicking Text Link?
I have a page that I need to change variabels with, based on what link you click on the page.

Validate Your Account By Clicking On A Link In The Email
i have a registration page and what  whant to do is make it so users have to validate an account by clicking on a link in the email like you see on most sites.

Alert Popup Box
I can't find a way to create an alert popup box for debugging, is this
possible in php? I guess I'm thinking of visual basic where that was so
easy, in php I normally use *print* for this but it can be hard to find.

Making An Alert With Php
i have this code that when the user click it will delete the record:

echo' <td bgcolor="'.$color.'" width="40"><font face="Verdana"
size="1">
<a href="del.php?id='.$id.'&dbf='.$dbf_new.'">delete</a></
font></td>'

i wanted to do a little confirmation before commiting the action. how
to do it?

Alert Messag
I have trouble to display an error message when user does not select anything from a drop down menu in the form. What makes my situation different is that the data in the drop down menu is generated from the database. Code:

Alert Function
Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

Alert Boxes
do u know the alert box in javascript?

when u write alert("somthing");

well i need that in php what is the alternative function for that in php?

File Changed Alert
I have a Client Management system, and the client's plain text files financialplan.txt, contactinfo.txt, and projectdesc.txt.

These text files are in the client folder (public_html/clients/george) and they are to be included onto one of the client management pages (not yet created).

I need to know if there is a way to detect if a file has been edited, and alert a user if he or she has not yet viewed the changes. The client files might be edited by myself, and my partner to be alerted of these changes, so he may go view the changes. Then when he has viewed the changes the alert would go away, of course.

Javascript Alert Question
I'm working on an e-mail form (btw many thanks to Philip Ronan for the
very cool email address format tester function, best I've seen so far).

I've been trying, with limited success, to produce a javascript alert
box which shows the user a validation error message. The error message
itself is dynamic, i.e., it's contained within a php variable.

I seem to be running into two issues:

1. I can raise the alert box, but I can't pass the string contained in
the $myerrormessage variable. Clearly I don't quite have the syntax just
right.

2. When the alert box does appear, the content of the web page behind
the alert box disappears, i.e., the page goes blank. When the user
clicks the OK button on the alert box, the blank web page remains, and
the user must click the Back button to return to the form.

The html that generates the form is wrapped inside a php function (the
file itself is php). The 'action' attribute of the form is "<?php echo
$PHP_SELF ?>". The form also contains a hidden field called 'action'
whose value is 'send_mail'.

When the user clicks the submit button, the script calls itself
recursively, and the $action variable's value, 'send_mail', is sent to a
switch. The switch calls a send_mail function, which performs all the
validation checks and generates an html error message if $myerrormessage
is not empty. This script was based on models provided in this book:

http://www.wrox.com/WileyCDA/WroxTi...0764557440.html

Currently I'm rendering the error message via another php function which
produces the html containing $myerrormessage. This works just fine, of
course, but I'm afraid some wiseguy web developer out there will look at
it and proceed to tell me all about how lame it is.

Can I add an onclick attribute to the form, to call a javascript
function inside the <body> tag of the html which renders the form?

Clicking Text
is there away to click on any text on a page and have it add that text to a text box? so if i click on the word (phpfreaks) it will add it to a text box.

Security Alert! The PHP CGI Cannot Be Accessed Directly.
I have installed php4.2.2 using the windows installer but i am having problem. I get the message:

Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

Empty Field Alert And Go Back
I would like to alert the user that leaves a blank field that it is obligatory. After that return him to the previous page... I tried this code but it doesn't work. I can either alert and continue to the next page, or simply return to the previous page without the alert.. Code:

HTML Forms - Alert To Save Changes
Is there a way in PHP to prevent a user from moving away from a page with an HTML form on when they made changes and didn't click submit? I would like some alert box to confirm if they want to leave or if they want to save the changes. Is that at all possible? I've tried Javascript but with no luck.

Clicking Pictures To Appear In The Textarea.
I am trying to do a function where you click on the images and these are entered into the textarea. Exactly as if i was clicking on this above and it enters the code for the picture into this textarea.

PHP And Java Applet : Instant Alert Problem......
I have a web page entry and a java applet running at the "manager" office. I need to instantly send an alert to the "manager" once the customer had key in their transactions.

I'm wondering how should I do this? by using php socket? to use another programming language to develop the server ? anyone with any experience before in doing this.

I did manage to come out with something. Here's what I've come out with :

a) a php socket server waiting for connection.
b) load an applet to connect to the php socket server.
c) the socket server will fetch from the database every 'n' seconds to send the latest data.

it works.....but the php socket can only allow one connection at a time. And I am trying to make it as real time as possible because a few sec of delay can cause a very big impact.

How To Redirect After (header) After Sending An Alert Message
I have a php script that checks whether the user is allowed to perform an
action. If he is not allowed; I display a warning; using the alert function.
After clicking away this function, I want to redirect the user to the
original page using the header function.
However, I get the normal message " headers already sent"... I know what
the problem is.
But how do you normally deal with this situation? use a html/php for the
warning instead of alert message? or is there another way?

Popup Alert Similar To Yahoo Messenger In PHP
I would like to create a pop up something similar to yahoo messenger
popup which comes on the right pan of the status bar. This i planned
to alert the users via popup when he gets the mail.



Sending Form Data Without Actually Clicking?
Is this possibe? Say you wanted to test that a form was working correctly, every so often you could with a cronjob run a script to process the form for you.

Attach Files By Clicking The Image
How to attach files by using the image...by clicking the image it will come a pop up message (the attachment page with browser button)...and i can attach the files..

Hitting Enter On A Form Instead Of Clicking The Button
I'm getting incorrect response when hitting the enter key instead of
actually clicking the button on a form. It activates but the post data
[value='Update'] isn't being sent I think. The php generated page
flickers & reloads but doesn't perform the update.

This is php generated, I'm just pasting the page source (reformatted &
extra junk removed and I think they are now identical), and it's running
on my localhost apache server for testing so maybe there's something
funny with my setup. Crossposted to html & php groups.

Must click button (no enter):

<form action='?SC=cart.php' method='POST'>
<tr>
<td>
<input type='hidden' name='item' value=&#55618;&#57133;'>name
</td>
<td>
<input type='submit' name='buy' value='Update'>
</td>
<td>
<input type='text' name='item_qty' size=&#391;' value=&#392;'>
</td>
</tr>
</form>

Enter or click works fine:

<form action='?SC=cart.php' method='POST'>
<tr>
<td>
<input type='hidden' name='item' value=&#55619;&#56572;'>name
</td>
<td>
<input type='submit' name='buy' value='Update'>
</td>
<td>
<input type='text' name='item_qty' size=&#391;' value=&#392;'>
</td>
</tr>
</form>

Here they are without me fixing up the formatting:

Must click button (no enter):

<form action='?SC=cart.php' method='POST'><tr>
<td><input type='hidden' name='item' value=&#55619;&#56572;'>Adiantum jordanii / -
1 gal</td>
<td><input type='submit' name='buy' value='Update'></td>
<td><input type='text' name='item_qty' size=&#391;' value=&#391;'></td>
<td>$&nbsp;9.00 </td><td>$&nbsp;9.00 </td><td>0%</td>
<td>10%</td>
</tr></form>

Enter or click works fine:

<form action='?SC=cart.php' method='POST'><tr>
<td><input type='hidden' name='item' value=&#55618;&#57133;'>Adiantum jordanii / -
1 gal</td>
<td><input type='submit' name='buy' value='Update'></td>
<td><input type='text' name='item_qty' size=&#391;' value=&#392;'></td>
<td>$&nbsp;10.00 </td><td>$&nbsp;20.00 </td></tr></form>
<tr><th colspan=&#394;' align='right'>Tax:</td><td>$
1.70</td><td>&nbsp;</td></tr>
<tr><th colspan=&#394;' align='right'>Delivery:</td><td>$
0.00</td><td>&nbsp;</td></tr>
<tr><th colspan=&#394;' align='right'>Order Total:</th><th>$&nbsp;21.70</th>
<th><form action='?SC=checkout.php' method='post'><input type='submit'
name='checkout' value='Checkout'></form>

Problem With HTTP_REFERER When Clicking On Refresh Button
In a simple webshop application I am trying to check that the "shopping
cart" only should be "filled" when you choose an article in "meerinfo.php"
and click on a link to "winkelwagen.php". It works fine in that sense that
when I would enter in the browser "www.mysite.php/winkelwagen?id=5"it will
be ignored.
However when I go from meerinfo.php to winkelwagen.php , the article is
added again and again to the shopping cart when I click on the refresh
button in Internet Explorer. Is there a way to avoid that?

This is the code in winkelwagen.php

if(!isset($_SESSION['artikelen'])) //initiate the array when the first
article is added to the shopping cart
{
$_SESSION['artikelen'] = array();
}
$waarvandaan = $_SERVER['HTTP_REFERER'];
if (strstr($waarvandaan, "meerinfo.php"))
{
$id = $_GET['id'];
$_SESSION['artikelen'][] = $id;
}

How To Call A Dll File By Clicking An Icon/image In A Webpage
how to call a dll file by clicking an icon/image in a webpage using php.

Moving A File To A Directory By Showing Clicking A Thumbnail
I would like to show a users uploaded files as a clikkable thumbnail which when pressed renames(moves the image into its new directory) I have gotten as far as making them appear as thumbs that link to large images, Code:

Clicking Browser's Back Button Shows An Empty Page
On my website www.lahabitacionroja.com developed using Php I am experiencing the following problem:

When a user with MS Explorer 5.0 or older clicks the back button on the browser it shows an empty page...
If you try with MS Explorer 6.0 this problem doesn't happen.

Does anybody why it happens and if there is any easy solution??

Is it a browser issue, an Apache issue....

How Do You Make The Contents Of A Text Box Remain, Even After Clicking Send, With Errors ?
How do you make the contents of a text box remain, even after clicking send, with errors?

At the moment, the visitor inputs a load of text into the comments box, but if they click send and there's errors in other fields on the page, the comments box goes blank and they have to start all over again ...

Dynamic Download Link - Not Direct File Link
I'm posting a podcast feed that makes reference to audio files for download. Instead of linking to the files directly (e.g. www.mywebsite.com/podcast.mp3), I want to link to the file as get variables so that I can track number of listeners (e.g. www.mywebsite.com/?audio=podcast.mp3). Where would I look to get something like this to work? How do I start sending audio data to the user using a link like this?

Determine If User Came From Inner Link Or An Outside Link
any php method or function to determine if a user came from within the website or from an outside website. I have a page that I want to display in different manners depends on how did the user arrive at my site.

I know about the HTTP_REFERER function. but don't really know how to use it. I know this is the syntax:

<?php
echo $_SERVER['HTTP_REFERER'];
?>

but when i entered the code in the php page. for instance test.php, there is nothing coming up. So my questions:

1. is there any other method?
2. could any of you maybe specify a bit more details about this function and how to use it.

Open .php File With PHP Designer 2007 By Clicking The File In XP
In windows XP, I want to be able to click on a .php file and have it
opened in PHP Designer 2007,
Or right-click on it and have an "edit" menu option presented to me.
I know how to tweak the registry to do this in general, but what would
the command line look like in this specific case ?
PHP Designer does not do this automatically. It is as if the program
does not allow commandline options.
It only opens with the last file used or a menu of recently opened
files.

Submit Form Without Clicking Submit Button
I was wondering if it is possible to use something like Javascript to make it so you don't have to click the submit button on a form to make it submit, while using php and mysql. e.g. Code:

Link?=ID#
I am wondering if there is a script/code somewhere to find that hides my actuall links from browsing users, no database related. For example. My links on a webpage


link 1 = http://mysite.com/hello.php
link2 = http://mysite.com/byebye.php

I want to hide theese links and for the outsidebrowsers to look like this:

link1 = http://mysite.com/redirect.php?ID=12
same for link 2 but with a different ID

hope ypu understand .Please note : NO MYSQL support.

Using An As A Link
Now I am able to practice php on my pc, thanks to previous replies to a
post in this forum, here the first of many questions.

I want to be able to use an image as a link. So in html I would use:

<a href="http://www.somepage.com">
<img src="someimage.jpg">
</a>

I have written the php code below (which I am proud of !!):

<?php

// Switch statement based off server time
switch (date('H i D'))
{
case &#3922; 33 Sat':
print '<img src="michelle.jpg" border="2" height="170"
width="227" />'
break;

case &#3922; 34 Sat':
print '<img src="sunset.jpg" border="2" height="170"
width="227" />'
break;

default:
print 'Cases not met'

}

?>

Now the code above does what I want it to do but if I add the line
below i get a parse error:

case &#3922; 35 Sat':
print '<a href="http://www.somepage.com"><img
src="someimage.jpg"></a>'
break;

So how do I create a link from the images in my code?

Getting 404 Link
Thanks to my apache .htaccess file, all the 404 errors are redirected to my
404.php file.

I'd like to get the following infos :
- the page address from which the 404 error come from (I get it with
$_SERVER["HTTP_REFERER"]),
- the exact link that provoqued a 404 error.

How can I get the 2 piece of info ?

Link In If
if i have the following how do i make the new chat message a link?

<? $numbernow=($chat[0])?>
<? if ($stat[chatnow] < $numbernow) {
       print "NEW CHAT MESSAGES";
}
?>

Link Regexp
I am try to get all the links out of a document with a regexp.

Link Redirection
Is there any way to redirect a link to another page after it has been first used? Or even kill the link after its first use?

GET Variables Through Link
Maybe this is all just going right by me and I should probably understand this well by now, but it didn't work the first time, and I have yet to find the right answer.

I'm looking to have a list of names, like James, Bill, Sam...etc on a page. With these names there will be a work function say Accountant, Billing, Janitor, and there will be another variable like office, 1, 102, closet...etc.

KW To Link Like Phpgiggle
I am looking for a php script like phpgiggle which coverts predetermined keywords into predetermined links each time the keyword appears in the page.

Tried to get phpgiggle up and running but with no success and with the author's site down and with no support at all, i am looking for an alternative.

Mailto: Link
My script is <? $MyLink='<a href="mailto:<? echo $Email;?>">'.$Email."</a>"; ?>
This is then saved to a file (txt) and the data inside the file is:
<a href="mailto:<? echo $Email; ?>">xyz@zbc.com</a>
So when I click on the mailto: link the status bar reads:- mailto:<? echo $Email ?> and
the mailer opens with no address.

Php Link Checker
I want to test if my swf files and jpg files are not broken.
I use the fuction fsockopen but this fuction does not work for a file+extension, just domain. Eg www.url.com is ok, but www.url.com/image.jpg is not! but image.jpg is exists!

There is something to that check the full url of files?

Link Problem
I am using the following PHP coding but I have got a error message coming up so what am I do wrong?

<a href="calender.php?action=$outputaction"><img src="$daycheck.jpg" border=0></a>

ODBC Link In Php
I need to use an MS Access DB on my php server. I'm having problems getting it to work though. PHP Code:

PHP Link List
On a page from Thredz (http://www.thredziii.com) I saw a script (it's not on anymore...cause he didn't want the script to be on his page) and I love it...

It's a script that makes it possible that on a page links are sorted ALPHABETICALLY with the first letter of the "URL name"... (take a look on Thredz' site to c what I mean,K?)

Then people got 2 have the abbility to fill in a small form, ON THE SAME PAGE WHERE THE LINKS ARE ON, where they fill in 2 fields;
#1 = Name of the Site ($sitename)
#2 = URL of the site ($url)

When they fill out it form I want the PHP-script to put the information away as a link (in a *.txt-file...if possible)
<A href="$url" target="_blank">"$sitename"</A><br>
(something like this??? I'm not sure......)
These links have to be sorted alphabetically (on the site's name,$sitename...

I don't know how this works or how I have to make something like this... Could somebody please help me and give me a bit of help with it? Some explaining would be gr8 but the script written for me is the best wish I have.

Printing Next Link!
Having trouble printing next / prev links. PHP Code:

Link Problem.....
I need some help for link redirect. I am currently working with a b2b
site. I had define some rules in htaccess but due to auto append of
PHPSessionID at the end of link I could not do it properly so can any
one help me how to avoid that auto appand on phpsessionid at the end of
link.

for example I have a link like:

http://www.xyz.com/test.html

But it will create:
http://www.xyz.com/test.html?PHPSES...8f97d004ddc 1a

So I need to remove tht PHPSESSID from above link I need link as i
supplied,.

Mail Link
I'm using the following php script to send an email.

mail($to, $subject, $message, $from)

I have a question though. How do I construct $message to include a web-link
so that the reader of the email can open the email and click the link in the
email to be forwarded to a linked website.

Assign Value To The Link
I am creating a order-online application. I create some links in my html file. And in my table that I created by mySQL, there are some fields including picture_id, picture_name. What I want is to assign the picture_id to the link so that the picture_name will be selected (using mySQL) when the link was clicked. Can someone tell me how to write PHP code to assign the picture_id to the link?

Link Checker
i need a script that checks urls and if they are okay then includes them....PHP Code:

Session And Link
I've to create link to a new page using session variables.

I've about 20 variables already set, so this is OK. But now I've 50 links to
various articles on my page. Those links are created dynamically using a
mysql table, so I take the ArticleID.

www.mysite.com/detail.php?ID=2
www.mysite.com/detail.php?ID=4
www.mysite.com/detail.php?ID=5
www.mysite.com/detail.php?ID=7
www.mysite.com/detail.php?ID=54
....

I'd like to avoid passing the ID in the URL. It's there any way to pass it
in the SESSION variable. Javascript isn't possible, so I'd like to know if
it's the only way to create the link. Or maybe must I use a FORM for every
artivle ? but with a link, I must use javascript....


Copyright © 2005-08 www.BigResource.com, All rights reserved