Re: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-05 Thread Richard Lynch
On Mon, December 4, 2006 3:03 pm, Mark London wrote: Is there any way for PHP to know whether it is being called due to a browser refresh versus a mouse click? I think the answer is no but I just want to be sure. Thanks. You could embed a random token in all your links and input forms, and

Re: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-05 Thread Mark London
Hi - Thanks! This is the solution I actually realized myself last night, after many hours of looking at the other solutions and finding problems with them. Thanks to everyone who responded! - Mark Richard Lynch wrote: On Mon, December 4, 2006 3:03 pm, Mark London wrote: Is there any way

RE: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Jay Blanchard
[snip] Is there any way for PHP to know whether it is being called due to a browser refresh versus a mouse click? I think the answer is no but I just want to be sure. Thanks. [/snip] Not unless you specifically capture and send a JavaScript onClick event. A mouse click typically takes you

Re: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Paweł Stradomski
W liście Mark London z dnia poniedziałek 04 grudnia 2006 22:03: Is there any way for PHP to know whether it is being called due to a browser refresh versus a mouse click? I think the answer is no but I just want to be sure. Thanks. Perhaps looking at REFERER HTTP header could give you some

Re: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Russell Jones
Yes, sort of. lets say that your page is 'http://www.php.net' and you want to make sure your visitor got there with a click, and not a refresh... first, get the referer... $_SERVER['HTTP_REFERER']; then do something like this... $refsite = file_get_contents($_SERVER['HTTP_REFERER']); $refsite

RE: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Paul Novitski
At 12/4/2006 01:08 PM, Jay Blanchard wrote: [snip] Is there any way for PHP to know whether it is being called due to a browser refresh versus a mouse click? I think the answer is no but I just want to be sure. Thanks. [/snip] Not unless you specifically capture and send a JavaScript onClick

Re: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Casey Chu
Oooh... now that I think about it, it doesn't work. Sorry =( On 12/4/06, Paul Novitski [EMAIL PROTECTED] wrote: Hi Casey, Yes, I can see that your javascript function adds a random number to the href of a clicked link, but how does that help PHP distinguish between a page loaded that way and