if ($page == "logout")
{
setcookie("ucookie", "", time()-7200, "/");
setcookie("pcookie", "", time()-7200, "/");
}
if ($page == "login")
{
$unpw = array("username"=>"password");
if ($unpw[$username] && $unpw[$username] == "$password")
{
setcookie("ucookie", $username, time()+7200, "/");
setcookie("pcookie", $password, time()+7200, "/");
$message = "Welcome back, $username";
} else {
$message = "Login incorrect.";
}
}
include("include/header.inc");
print_r($_COOKIE);
echo "$message";
In IE it works fine, but in firefox it doesn't store any cookie. I've looked through my cookies after entering the username/password but it doesnt exist. My only other thought if my code is fine, is some how my installation of firefox is messed up.