As my title said the question, i want to destroy my session after a particular time if user is being ideal.. currently i am using this code to define my session: session_start(); // Check, if username session is NOT set then this page will jump to login page if (!isset($_SESSION['myusername'])) { header('Location: admin.php'); } Code (markup):