Cool-Shopping-Site/logout.php

18 lines
257 B
PHP
Raw Permalink Normal View History

2024-05-17 20:57:41 +00:00
<?php
session_start();
unset($_SESSION["uid"]);
unset($_SESSION["name"]);
$BackToMyPage = $_SERVER['HTTP_REFERER'];
if(isset($BackToMyPage)) {
header('Location: '.$BackToMyPage);
} else {
header('Location: index.php'); // default page
}
?>