LRR/logout.php

24 lines
493 B
PHP
Raw Normal View History

<?php
2022-06-15 17:00:02 +08:00
// Start a new session
session_start();
// Destory sessions & redirect to index
session_destroy();
session_unset();
2022-06-15 17:00:02 +08:00
// Generate a new session ID
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']);
header("Location: index.php");
?>