This commit is contained in:
Walter Hupfeld
2024-02-17 08:42:54 +01:00
parent 0df6729f8b
commit 91a8c4e567
14 changed files with 42 additions and 59 deletions

View File

@@ -20,7 +20,7 @@ $boolLogin=true;
$strPassword = trim($_POST['password']);
$strSQL = "SELECT username,passwordhash FROM user WHERE username='$strUser'";
$result = $db->query($strSQL);
if ($row=$result->fetchArray()) {
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
if (password_verify($strPassword,$row['passwordhash'])) {
session_start();
$_SESSION['user']=$strUser;