Hi,
Does anyone know a way of doing this?
Thanks
javascript:history.back();
Many thanks for the info - it works fine thanks. Do you know if it can be done using php or if not perhaps html?
I don't really like relying on javascript in case it's been disabled.
many thanks
You can do something like this:
$back = $_SERVER['HTTP_REFERER']; echo '<meta http-equiv="refresh" content="0;URL='.$back.'">';
Or all PHP:
$back = $_SERVER['HTTP_REFERER']; header('Refresh: 3; URL=$back');
That worked great. Thanks to you both for the responses
Don't forget that the HTTP_REFERER header is provided by the client and is completely optional, meaning that it's not always present.
The last option I can think of would be to track the users page by page using sessions and/or a database and use that as the referer.
Another note ... referrer doesnt cause a spelling error (in FF), but referer does and we use HTTP_REFERER ... odd.
Kudose wrote:Another note ... referrer doesnt cause a spelling error (in FF), but referer does and we use HTTP_REFERER ... odd.
Indeed.
"...a misspelling that somehow made it into the HTTP standard..."
Sounds like the US government ... agreeing to stuff they don't even read.
Er... since when did the US government have anything to do with HTTP standards? :eek:
I was making an analogy. 😛
Wow, I totally misread it. sigh Okay, I really shouldn't be posting at 4.06am!