mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
14 lines
322 B
PHP
14 lines
322 B
PHP
|
<?php
|
||
|
session_start();
|
||
|
include $_SESSION["docroot"].'/config/config.php';
|
||
|
include $_SESSION["docroot"].'/php/connect.php';
|
||
|
|
||
|
$mysqli->query('DELETE FROM `sessions` WHERE `session_id`=\''.$_COOKIE["token"].'\';');
|
||
|
|
||
|
unset($_SESSION);
|
||
|
session_destroy();
|
||
|
|
||
|
setcookie("token", "logout", 0, "/", "");
|
||
|
header("Location: /../");
|
||
|
?>
|