sql sanitized

This commit is contained in:
Tim Krehan 2019-05-22 10:48:09 +02:00
parent 3fe391dbc8
commit 199539a1c3

View file

@ -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();