PHP Technical Blog
Wednesday, July 21, 2010
Session Time out in PHP - Simple Example
session_start();
// 10 mins in seconds
$inactive = 600;
$session_life = time() - $_session['timeout'];
if($session_life > $inactive)
{ session_destroy(); header("Location: logoutpage.php"); }
S_session['timeout']=time();
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment