last minute fix

This commit is contained in:
Tim Krehan 2019-05-22 10:58:23 +02:00
parent 199539a1c3
commit 7cb09a2e67

View file

@ -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"]);