From 7cb09a2e6767b597de647befca5618bf6071c08a Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Wed, 22 May 2019 10:58:23 +0200 Subject: [PATCH] last minute fix --- php/login.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/php/login.php b/php/login.php index dd52d59..cbe7dc1 100644 --- a/php/login.php +++ b/php/login.php @@ -33,8 +33,9 @@ if ($result->num_rows == 1) $insertQuery->execute(); } - $updateQuery = $mysqli->prepare("UPDATE `users` SET `last_login` = \'".date("Y-m-d H:i:s")."\' WHERE `uid` = ?;"); - $updateQuery->bind_param($userdetails["uid"]); + $lastLoginDate = date("Y-m-d H:i:s"); + $updateQuery = $mysqli->prepare("UPDATE `users` SET `last_login` = ? WHERE `uid` = ?;"); + $updateQuery->bind_param("ss", $lastLoginDate, $userdetails["uid"]); $updateQuery->execute(); $mysqli->close(); header("Location: ".$_POST["refurl"]);