From 908f60552eb6db445855e31d9a42d9f04976f8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Thu, 16 Mar 2023 13:54:19 +0100 Subject: [PATCH] added logout --- logout.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/logout.php b/logout.php index 3faad83..de92423 100644 --- a/logout.php +++ b/logout.php @@ -23,5 +23,10 @@ } session_start(); - unset_($_SESSION["email"]); + $data = json_decode(file_get_contents("php://input"),true); + if($data["accept"] == true){ + session_destroy(); + echo json_encode(true); + } + else echo json_encode(false); ?> \ No newline at end of file