logout.php: indent code and add matching ?>.

Hui-CodeIndentation
Lan Hui 2021-10-18 23:36:21 +08:00
parent ac6956d58c
commit d2509e8de5
1 changed files with 11 additions and 10 deletions

View File

@ -2,9 +2,9 @@
// Destory sessions & redirect to index // Destory sessions & redirect to index
session_destroy(); session_destroy();
session_unset(); session_unset();
// Start a new session // Start a new session
session_start(); session_start();
// Generate a new session ID // Generate a new session ID
@ -12,11 +12,12 @@ session_regenerate_id(true);
// Then finally, make sure you pick up the new session ID // Then finally, make sure you pick up the new session ID
$session_id = session_id(); $session_id = session_id();
unset($_SESSION['user_id']);
unset( $_SESSION['user_id']); unset($_SESSION['user_email']);
unset( $_SESSION['user_email']); unset($_SESSION['user_type']);
unset( $_SESSION['user_type']); unset($_SESSION['user_student_id']);
unset( $_SESSION['user_student_id']); unset($_SESSION['user_fullname']);
unset( $_SESSION['user_fullname']);
header("Location: index.php"); header("Location: index.php");
?>