I'm using Internet Explorer and it worked for me!
cscgal
The Queen of DaniWeb
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
document.referrer may contain the address of the previous page or it may not. There are a number of factors that can affect this such as browser settings, firewall settings, IE also suppresses the value if the prior page was on a secure server, etc. If this happens then you have no way to tell what page your visotir was on previous to coming to your page.
felgall
Junior Poster in Training
50 posts since Aug 2004
Reputation Points: 13
Solved Threads: 1
...but it did work for me, IE and FireFox.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Whether the script works or not can depend on the browser and firewall settings on individual computers. That would be the reason some people say it works and others say it doesn't. You can't rely on document.referrer containing anything as there are too many different ways it can be turned off.
felgall
Junior Poster in Training
50 posts since Aug 2004
Reputation Points: 13
Solved Threads: 1
A client side solution means the client has to load the page first, you absolutely need a server side solution.
PHP session variables I think would be the way to go, when a page is requested, your PHP on the server would determine what was served up to the requestor.
I have not used PHP sessions yet so I could not explain it's use, but have been reading about it so I can implement it in the near future.
Here are some links that might help:
http://us.php.net/manual/en/ref.session.php
http://www.sitepoint.com/article/users-php-sessions-mysql
HazardTW
Junior Poster in Training
71 posts since Sep 2007
Reputation Points: 37
Solved Threads: 3