Session timeout
Posted: Wed Apr 13, 2011 11:18 am
Hi everyone, been a while since my last thread.
Ive got a session named 'username' that is working fine but I just need a simple script to force a session timeout.
The session script is as follows:
Does anyone have a simple session timeout script?
Thanks to anyone in advance.
tdsrogers
Ive got a session named 'username' that is working fine but I just need a simple script to force a session timeout.
The session script is as follows:
Code: Select all
session_start();
if( ! $_SESSION['username'])
{
header("location:index.php");
}
?>
<?php
$uname = $_SESSION['username'];
Thanks to anyone in advance.
tdsrogers