From d2509e8de589ad4339d8fa350e674b6da9452c00 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:36:21 +0800 Subject: [PATCH] logout.php: indent code and add matching ?>. --- logout.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/logout.php b/logout.php index d09c644..ad306cc 100644 --- a/logout.php +++ b/logout.php @@ -2,9 +2,9 @@ // Destory sessions & redirect to index - session_destroy(); - session_unset(); - // Start a new session +session_destroy(); +session_unset(); +// Start a new session session_start(); // Generate a new session ID @@ -12,11 +12,12 @@ session_regenerate_id(true); // Then finally, make sure you pick up the new session ID $session_id = session_id(); - - - unset( $_SESSION['user_id']); - unset( $_SESSION['user_email']); - unset( $_SESSION['user_type']); - unset( $_SESSION['user_student_id']); - unset( $_SESSION['user_fullname']); + +unset($_SESSION['user_id']); +unset($_SESSION['user_email']); +unset($_SESSION['user_type']); +unset($_SESSION['user_student_id']); +unset($_SESSION['user_fullname']); header("Location: index.php"); + +?>