<?php
session_start();
header('Content-Type: application/json'); // Response berupa JSON

session_unset();   // Hapus semua data session
session_destroy(); // Hancurkan session login

// Kirim respon logout sukses
echo json_encode([
    "status" => "success",
    "message" => "Logout berhasil"
]);
?>