lalnfl Posted September 21, 2010 Author Share Posted September 21, 2010 <?php if($_SESSION['session_count'] == 0) { $_SESSION['session_count'] = 1; $_SESSION['timeout'] = time(); } else { $_SESSION['session_count'] = $_SESSION['session_count'] + 1; } // 10 minute in seconds $inactive = 600; $session_life = time() - $_SESSION['timeout']; // connect to database include_once ("Scripts/mysql_db_connect.php"); if ($session_life > $inactive) { $sql_logged_out = mysql_query("UPDATE Member SET logged_in='lo' WHERE id='$id'"); session_unset(); session_destroy(); } $_SESSION['timeout'] = time(); ?> Link to comment https://forums.phpfreaks.com/topic/213829-help-with-sessions/page/2/#findComment-1113535 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.