Hi all,
I have the following:
$history = $_SERVER['HTTP_REFERER'];
$_SESSION['history'] = $history;
session_register("history");
I also have a login area where i check a users username and password. When the user submits this form the validate.php script comes into play.
All works well except when the user submits incorrect details. This is a snippet of that script:
if ($_POST['sign_in'] == 'true')
{
header ("Location: login.php?error=true");
}
The problem is that if the above statement is true then i get taken back to the login page and the $_SERVER['HTTP_REFERER'] variable becomes "login.php?error=true", not the original referer.
Is there anyway to store the original HTTP_REFERER or another way alltogether.
Cheers,
micmac