Hi,
I seemed to have made a mess of my cookies / sessions for login/logout purposes.
On my desktop, I am able to log out no problem. However on my laptop, it will not log me out.
This is what I have:
login.php
PHP Code:
setcookie("USERID",$r['id'],time()+2592000);
$_SESSION['USERID'] = $r['id'];
db.php (included at the top of every page)
PHP Code:
if (@!$_COOKIE['USERID'] AND $_SESSION['USERID']!=0) {
if(isset($_SESSION['USERID'])) {
$_COOKIE['USERID'] = $_SESSION['USERID']; // I included this because with only cookies, some people were saying they could not login at all.
}
}
logout.php
PHP Code:
setcookie("USERID",""); // I've also tried: setcookie("USERID","",time()-2592000);
unset($_SESSION['USERID']);
EDIT: This issue actually appears to be an IE issue (surprise surprise), although I'm sure it's still due to my coding... I can lout no problem on Firefox on my desktop, but not in IE
Any help appreciated!