Is there any way to determine the URL of where the user came from using PHP? Or is this better done using javascript's history list?
www.php.net
dont be lazy
Sorry, I thought this was one of those sites that was supposed to help people who had legitimate PHP questions. Guess I was wrong!
Thats All The Legitamite Help You Need Its In The Function Reference.
In my original question I was asking whether it was better to do it using PHP or javascript. I was looking for someone who could give a recommendation over which method is better. Instead, I got a guy calling me lazy!
It's a matter of preference. I prefer PHP, because Javascirpt can be turned off, and because I like my data server-side.
For more detailed information on the refering page, see the PHP manual about predefined variables.
Thanks. 🙂
try this script too
foreach(array_keys($_SERVER) as $cur_key) { echo "\$_SERVER['$cur_key'] = " . $_SERVER[$cur_key] . "<br />\n"; }