I am having serious cookie issues. if I login without using remember me, everything is fine.
If I check remember me, it lets me login but if I close the browser and open it back up it wont auto login it just says page cannot be displayed like its a corrupt cookie.
the only way to make it work again is to delete the cookie
Here is my set function:
if ($remember == "on") {
setcookie('email', $email, time() + 86400);
}
Here is my logout function:
session_destroy();
if(isset($_COOKIE['email'])) {
unset($_COOKIE['email']);
setcookie('email', '', time() - 86400);
}
redirect("index.php");
Also, when I look at the cookie file in explorer browser, it looks like this:
email
me%40mymail.net
localhost/mysite/account/
17408
78850176
30494094
3665530565
30493892
So what happens is, I have to delete the cookie to show the login page again.