Jump to content

timeout


johnnyblaze9

Recommended Posts

Sessions are probably your best bet. By using a cookie to store the login session, you can also set how long it's good for. So if they try to come back and the time limit has expired, they will not be logged in. I have never done it before, so I can't offer any concrete verbiage as to what exactly goes on.

 

The same can be true for if someone leaves the page open. If the cookie is only good for so long, whenever they try to move to another page, then they won't have access to it because they will no longer be logged in.

Link to comment
https://forums.phpfreaks.com/topic/105419-timeout/#findComment-539869
Share on other sites

To expound on charlieholder's thoughts, my scripts use a $_SESSION variable, so as long as they keep the browser open, they will be logged in.  When the browser closes the session is over, so they are logged out.  If you want them to be logged in for as long as they want, you need to use an infinite cookie, or something like that.

Link to comment
https://forums.phpfreaks.com/topic/105419-timeout/#findComment-539873
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.