0) && (preg_match($cleanPass,$pass,$out)>0)) { return TRUE; } else { return FALSE; } } $userName = $_POST['userName']; $password = $_POST['password']; if (!cleanCheck($userName,$password)) { die('Illegal character'); } ##I'll but db shit here later## if ($userName == 'omg' && $password == 'test') { $_SESSION['auth'] = 'TRUE'; $_SESSION['time'] = time(); header("Locations: yo.php"); } else { $_SESSION['auth'] = NULL; $_session[failedLogin]++; header("Location: login.php"); exit(); } ?> AANODAR PAGE 3600) { session_distroy(); header("Location: login.php"); exit(); } else { $_SESSION['time'] = time(); } print_r($_SESSION); echo "$_SESSION['time'] $_SESSION['auth']"; echo " We wait for a minute and kill the session"; ?>