PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
however, do not assume it exists or is even valid. It's an optional component of the request headers, and as such may not exist or may be filtered out by something the user is communicating through.
or you can use sessions to pass the last page they viewed
as far as getting where they came from if the last page was not on your website, the only chance is the browsers referrer header, which isnt very reliable
if they don't provide it.. there's pretty much nothing you can do about it.
A page redirect alone, typically will pass on whatever referrer information was supplied to the first page. In your link, this is the case. Now, if you simply click on your link here, most likely, you will get the referrer information that will say this page.