RE: [PHP] RE: Ending a session with a timeout
| From: | John Holmes | Date: | Sat, 14 Sep 2002 14:28:09 +0000 |
| Subject: | RE: [PHP] RE: Ending a session with a timeout | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116371@lists.php.net to get a copy of this message | ||
> I am developing an application where the user must login to see
certain
> pages. This is done via sessions
> (pretty routine).
> Question:
> How do I expire the session if there is an inactivity time (say 10
> minutes).
> which will make the user to login again.
Just store the current time in the session and on each page request
check if it's over 10 minutes old. If it is, make them log in again, if
it isn't, update the time, and proceed.
---John Holmes...