Hi,
If I am correct then, the $_SESSION variable/array is a storage mechanism that can store variables to pass information between several pages. As the name implies, the variables set are stored for the entire session.
I currently have a page that does the following:
Page1:
$_SESSION["authenticated"]="incorrectEmail"
I want to use this session variable page2:
$authenticated = "";
if (isset($_SESSION["authenticated"]))
{
$authenticated=$_SESSION["authenticated"];
}
print "authenticated= " . $authenticated;
switch ($authenticated)
{
case "incorrectEmail":
print "your email is incorrect";
case default:
print "not authenticated";
}
This second page will always output "not authenticated", although the first page did set the authenticated session variable
What am I doing wrong?
(I'm using PWS 4, PHP 4)
Thanks for your/any help,
Yaak
🙂 🙂