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();
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
yeah the isset would of helped :$
nice rewrite Rockcreektech apart from $_SESSION['start'] needs to be $_SESSION['timeout'];
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
Hi all,
I'm kinda newbie at this. But I was just wondering where are you placing this code? On every page? or just on the main login page, etc? Thanks
Mike
Put it on separate page and include it on every page needed!
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
Hi everyone,
I know this is an old post but ....
Start the New thread then. Let the old one die natural death :)
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392