diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-05-09 13:54:37 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-05-09 13:54:37 +0200 |
commit | 6d5c72f908e8f7c1c2b0defa696aad43c55fc1ba (patch) | |
tree | dc25b39f7f53b430e2d8eaccf5f077a1150beba8 /public/logout.php | |
parent | 770658c8434d7b7c0e716b7e375c733e79dc4a88 (diff) |
add logout link to footer
Diffstat (limited to 'public/logout.php')
-rw-r--r-- | public/logout.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/public/logout.php b/public/logout.php new file mode 100644 index 0000000..094ee22 --- /dev/null +++ b/public/logout.php @@ -0,0 +1,9 @@ +<?php +$prev = $_COOKIE['prev']; +if (!$prev) $prev = "/"; +http_response_code(302); +setcookie("prev", null, -1, "/"); +setcookie("username", null, -1, "/"); +setcookie("password", null, -1, "/"); +header("Location: ".$prev); +?> |