diff --git a/php/logout.php b/php/logout.php index fda1dbc..16e1fb8 100644 --- a/php/logout.php +++ b/php/logout.php @@ -3,7 +3,9 @@ session_start(); include $_SESSION["docroot"].'/config/config.php'; include $_SESSION["docroot"].'/php/connect.php'; -$mysqli->query('DELETE FROM `sessions` WHERE `session_id`=\''.$_COOKIE["token"].'\';'); +$deleteQuery = $mysqli->prepare('DELETE FROM `sessions` WHERE `session_id`=?;'); +$deleteQuery->bind_param("s", $_COOKIE["token"]); +$deleteQuery->execute(); unset($_SESSION); session_destroy();