I have an applications with sessions.
What happens is the following
- User logs in
- Session starts
- Session ID is assigned, scrambled wiht MD5() and save in database
On manual logout this happens
1. Logout class is instatiated
2. Session is destroyed
3. Session ID in DB is set to empty string in DB
4. User is redirected
I also use ini_set() to set the time out to one hour.
How do you get the logout script to execute automatically after the session times out? Basically if there is no activity after one hour, I want to redirect the user to the logout page where the script executes.