I set a session variable on error in the login page and then call the login
page again. I test on that session variable but it shows as not set. I
checked with an echo immediately after setting the error session variable so
I am 100% positive that it is set. The recursive entry to the login page
echos a message that the error session variable is unset.
Any clues?
Here is the setting code and the testing code (commented out)"
$MM_redirectLog inFailed = "ssLogin.ph p";
if ($loginFoundUse r) {
......
......
} else {
$_SESSION['MM_LoginError'] = "Login Error";
// echo "session variable is " . $_SESSION['MM_LoginError'];
header("Locatio n: ". $MM_redirectLog inFailed );
}
Here is the test to see try to get an error message echoed:
<?php
if (isset($_SESSIO N['MM_LoginError'])) {
echo "Login error =" . $_SESSION['MM_LoginError'];
unset($_SESSION['MM_LoginError']);
} else {
echo "_SESSION['MM_LoginError'] not set";
}
?>
page again. I test on that session variable but it shows as not set. I
checked with an echo immediately after setting the error session variable so
I am 100% positive that it is set. The recursive entry to the login page
echos a message that the error session variable is unset.
Any clues?
Here is the setting code and the testing code (commented out)"
$MM_redirectLog inFailed = "ssLogin.ph p";
if ($loginFoundUse r) {
......
......
} else {
$_SESSION['MM_LoginError'] = "Login Error";
// echo "session variable is " . $_SESSION['MM_LoginError'];
header("Locatio n: ". $MM_redirectLog inFailed );
}
Here is the test to see try to get an error message echoed:
<?php
if (isset($_SESSIO N['MM_LoginError'])) {
echo "Login error =" . $_SESSION['MM_LoginError'];
unset($_SESSION['MM_LoginError']);
} else {
echo "_SESSION['MM_LoginError'] not set";
}
?>
Comment