<?php
session_start();

// Destroy all session data
$_SESSION = [];
session_unset();
session_destroy();

// Remove EMAIL cookie if exists
if (isset($_COOKIE['EMAIL'])) {
    setcookie('EMAIL', '', time() - 3600, '/'); // expire the cookie
}

// Redirect to login page or home
echo '<script>window.location.href = "/Admin/";</script>';
exit;
?>
