php - Link on Session Expiry Destination Page reloads Destination Page -


i have site 2 sections, 1 section freely accessible (not password protected), while other, users have login username , password (restricted).

in restricted section have included session timeout of 10mins pages , working fine. however, i'm considering scenario jumps restricted area free area without logging out, , still want time out person in 10mins of inactivity before jumping free area. this, have included timeout code restricted area in free area, problem is: on destination page session timeout, have link supposed take user away timeout destination page , freely accessible page, instead link reloads timeout destination page.

this timeout code have on pages (restricted, free):

session_start(); if ($_session['timeout'] + 10 * 60 < time()) { // session timed out session_destroy(); header("location: mybq-logout.php");   } $_session['timeout'] = time(); 

can help? thanks.

try maybe wokrs.

if ($_session['timeout'] + 10 * 60 > time()) 

if can't see changes changed comparison sigh smaller --> greate to..


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -