$email]; header('Location: index.php'); exit(); } function logout() { session_destroy(); header('Location: login.php'); exit(); } function check_auth() { if (!isset($_SESSION['user'])) { header('Location: login.php'); exit(); } } if (isset($_GET['logout'])) { logout(); }