$inactive) { session_destroy(); header("Location: index.php"); } } $_SESSION['start'] = time(); if($_SESSION['valid_user'] != true) { session_destroy(); header('Location: index.php'); } ?>