mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-24 06:40:01 +01:00
15 lines
390 B
PHP
15 lines
390 B
PHP
<?php
|
|
session_start();
|
|
include $_SESSION["docroot"].'/config/config.php';
|
|
include $_SESSION["docroot"].'/php/connect.php';
|
|
|
|
$deleteQuery = $mysqli->prepare('DELETE FROM `sessions` WHERE `session_id`=?;');
|
|
$deleteQuery->bind_param("s", $_COOKIE["token"]);
|
|
$deleteQuery->execute();
|
|
|
|
unset($_SESSION);
|
|
session_destroy();
|
|
|
|
setcookie("token", "logout", 0, "/", "");
|
|
header("Location: /../");
|
|
?>
|