Asperon Posted July 30, 2007 Share Posted July 30, 2007 how do you destroy a session when the user leaves the website, or closes the browser etc Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/ Share on other sites More sharing options...
hitman6003 Posted July 30, 2007 Share Posted July 30, 2007 http://www.php.net/session_destroy Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311319 Share on other sites More sharing options...
Asperon Posted July 30, 2007 Author Share Posted July 30, 2007 I had already look at that, I just don't understand what is going...I understand most of sessions, I can get it all going with a log out button, but I don't understand how to end a session when the user navigates away. Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311326 Share on other sites More sharing options...
hitman6003 Posted July 30, 2007 Share Posted July 30, 2007 If they just navigate away, you can't do anything...you can set the expire time for the session to something rather low, but then if they are reading an article or something, and they're a slow reader, they could get logged out. If they close the browser, it will destroy the cookie, and consequentially the session. Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311329 Share on other sites More sharing options...
Asperon Posted July 30, 2007 Author Share Posted July 30, 2007 thank you, I am not using cookies I am just using session variables... or are they the same or similar, thank you.. Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311335 Share on other sites More sharing options...
Asperon Posted July 30, 2007 Author Share Posted July 30, 2007 alright it works the way I want it to for the most part now, thank you Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311337 Share on other sites More sharing options...
hitman6003 Posted July 30, 2007 Share Posted July 30, 2007 The user's session (which one belongs to them) is tracked via a cookie, unless you explicitly turn that action off in php.ini. Link to comment https://forums.phpfreaks.com/topic/62551-solved-_session-question/#findComment-311353 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.