View Full Version : COOKIES / SESSION - Logging out on one computer, not on another

02-21-2010, 03:32 AM

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:


$_SESSION['USERID'] = $r['id'];

db.php (included at the top of every page)

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.


setcookie("USERID",""); // I've also tried: setcookie("USERID","",time()-2592000);

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! :thumbsup:

02-21-2010, 05:29 AM
Okay so I listed this as resolved as I thought I had fixed the problem.

So I added into logout.php session_destroy();

This worked on my desktop... It now logged out correctly in both firefox and IE.. So I thought problem was solved.. but it isn't!

On my laptop - the same problem still occurs... Firefox logs out... IE does not! Both are IE v8. The only difference is desktop is XP and laptop is Vista... which I know that probably makes no difference, but its the only think I know of different between the two! HELP! :(

02-21-2010, 09:01 PM
Anyone have a solution/idea?