0
我使用cookie我的登录系统和系统适用于Chrome,但后来当我去到IE或Safari浏览器,它不工作。由于某些原因,cookies没有设置,我试图回应他们无济于事。Cookie在Chrome中运行,但不在IE或Safari中运行?
这里是使饼干代码:
if(isset($_POST['log_in_iniator'])){
$username = $_POST['username'];
$password = $_POST['password'];
$log_in_checker_status = check_user_data($username, $password);
if($log_in_checker_status == 'true'){
//user has successfully logged in, create two cookies
//cookie 1 username
setcookie('username', $username, 0, 'http://shkeek.com');
setcookie('loginstatus', 'true', 0, 'http://shkeek.com');
header("Location: index.php");
}else{
setcookie('loginstatus', 'invalid', 0);
header("Location: index.php");
}
}