mirror of
https://github.com/Supernova3339/anonupload.git
synced 2026-01-17 04:42:05 +01:00
16 lines
255 B
PHP
16 lines
255 B
PHP
<?php
|
|
|
|
// (A) START SESSION
|
|
session_start();
|
|
|
|
// (B) LOGOUT REQUEST
|
|
if (isset($_POST['logout'])) {
|
|
unset($_SESSION['user']);
|
|
}
|
|
|
|
// (C) REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
|
|
if (!isset($_SESSION['user'])) {
|
|
header('Location: ../');
|
|
exit();
|
|
}
|