<?php
session_start();
include "connection.php"; // optional
include "validation.php"; // optional

$response = [
    "status" => false,
    "message" => ""
];

if (isset($_SESSION["admin"])) {
    $_SESSION["admin"] = null;
    session_destroy();


    $response["status"] = true;
    $response["message"] = "User signed out successfully!";
} else {
    $response["status"] = false;
    $response["message"] = "No active session found.";
}



header("Content-Type: application/json");
echo json_encode($response);
?>
