Jump to content

Ending a session


crazy8

Recommended Posts

Sessions do expire when the browser closes.
They default to 30 minutes of inactivity. If you want it to only last a certain amount of time regardless of user activity, when the session starts save the timestamp, and on every page check if it's been past your time. If it has, close the session and log them out.
http://us2.php.net/session
Link to comment
https://forums.phpfreaks.com/topic/36497-ending-a-session/#findComment-173697
Share on other sites

Well maybe im not asking the right question or asking it the right way. I guess whats going on is that right now since im still writing up code for my project and testing stuff out (on a serverin the building) I will test out my form which uses the sessions and then when im done I will close the browser and even a few minutes later ill go back to the page and everything I had entered is still there. So i guess thats what I want to get rid of. As soon as i close browser and eventualy open again to have a new page not one displaying all the data I entered the time before. Does this make sence? ;D I probably just confused you more..lol
Link to comment
https://forums.phpfreaks.com/topic/36497-ending-a-session/#findComment-173711
Share on other sites

Are you closing the browser entirely, or using Firefox and closing tabs? You have to close the entire browser.
Perhaps you are caching the pages. Next time you go to the page, and it looks like the session is still there, hold down SHIFT and hit your refresh button. (This is a cache-clear refresh).

If none of this helps, can you post a link, let me try it?
Link to comment
https://forums.phpfreaks.com/topic/36497-ending-a-session/#findComment-173714
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.