fullyloaded Posted May 16, 2009 Share Posted May 16, 2009 hi im having a little problem after logging out of my site logging out is not a problem it will logout but after logging out the users online will still show im online even after 20 minutes so i checked my database to see whats going on under the online table in my database it is saying 1 (1=online) and (0=offline) is there anyway to set it back to 0 after logging out? here is a bit of code function logout() { unset($_SESSION['user']); unset($_SESSION['pass']); @session_unregister('user'); @session_unregister('pass'); setcookie("user", $_SESSION['user'], time()+1); setcookie("pass", $_SESSION['pass'], time()+1); session_destroy(); } Link to comment https://forums.phpfreaks.com/topic/158415-logging-out-problem/ Share on other sites More sharing options...
gnawz Posted May 16, 2009 Share Posted May 16, 2009 Aritw an update statement on logout that sets the desired filed to what you want Link to comment https://forums.phpfreaks.com/topic/158415-logging-out-problem/#findComment-835464 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.