From d134051f4de7eed3c09ee74e15f7c73b951d1478 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Thu, 7 Mar 2024 01:28:36 +0000 Subject: [PATCH] Update 2 files - /html/journal.php - /html/login.php --- html/journal.php | 2 +- html/login.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/journal.php b/html/journal.php index c67f61e8..d9dfc3ad 100644 --- a/html/journal.php +++ b/html/journal.php @@ -54,7 +54,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { } else { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("SELECT (ID, titre, date, auteur) FROM articles ORDER BY date DESC"); - $bdd->execute(); + $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); if ($resultat) { diff --git a/html/login.php b/html/login.php index 668ea933..293418fa 100644 --- a/html/login.php +++ b/html/login.php @@ -14,7 +14,7 @@ if(isset($_POST['username']) && isset($_POST['password'])) { $req = $bdd->prepare("SELECT (ID, username, email, display_name) FROM admins WHERE (username = :username OR email = :username) AND password = :password"); $bdd->bindParam(':username', htmlspecialchars($_POST['username'])); $bdd->bindParam(':password', md5($_POST['password'])); - $bdd->execute(); + $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC);