I currently have an admin page but the session is only destroyed when the admin logs out. What I would like to do is destroy the session if the admin leaves a page that has sessions (e.g. admin.php) and goes onto a page without sessions (e.g index.php or a different website) how can this be done?
Asked
Active
Viewed 753 times
0
-
You'll never know if the user goes onto a different website unless that website calls some of your code. – h2ooooooo Apr 27 '14 at 12:30
1 Answers
0
You should set the session_timeout to your desired value and be sure not to add 'session_start()' to your non-session pages, or explicitly log them out on those.
-
how would i use session time_timeout for killing the session after 10mins – user3560754 Apr 27 '14 at 12:31
-