18 lines
381 B
PHP
18 lines
381 B
PHP
<?php
|
|
require('../../../inc/connect.php');
|
|
|
|
$error = isset($_GET['error']) ? $_GET['error'] : 'You have succesfully logged out';
|
|
|
|
if(isSession())
|
|
{
|
|
$sessionid = getSession();
|
|
|
|
$sql = "DELETE FROM session WHERE `session`='" . $sessionid . "'";
|
|
ExecQuery($mysqli, $sql);
|
|
|
|
destroySession();
|
|
}
|
|
|
|
$link = ROOT . "login?error=" . $error;
|
|
header("Location: $link");
|
|
?>
|