notsophpfreakish Posted October 7, 2011 Share Posted October 7, 2011 I'm very new to PHP and have been working on my site idea for the past couple of weeks and have been working on the basic sign up, logging in, activation and log out. The log out works fine, but when I sign in with a second username, the first user name's information comes up instead. Here's the log out script: <?php session_start(); session_unset(); session_destroy(); setrawcookie('user'); ?> I tried a bunch of other stuff but nothing seems to work. Closing the window and stuff works fine but obviously, that's not the safest method. Quote Link to comment https://forums.phpfreaks.com/topic/248662-issues-with-cookiessessions/ Share on other sites More sharing options...
MasterACE14 Posted October 8, 2011 Share Posted October 8, 2011 <?php session_start(); session_unset(); $_SESSION = array(); // you may have to use this here for good measure session_destroy(); setrawcookie('user'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/248662-issues-with-cookiessessions/#findComment-1277122 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.