Files
InternetRadio-Website/manage/php/session/logout.php
T
2026-06-17 15:46:26 +02:00

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");
?>