From a709c9d4477201247033a0b30d4b07a658491bce Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Thu, 7 Mar 2024 01:30:12 +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 d9dfc3ad..5965d70f 100644 --- a/html/journal.php +++ b/html/journal.php @@ -53,7 +53,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { echo $parsedown->text($markdownContent); } else { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); - $req = $bdd->prepare("SELECT (ID, titre, date, auteur) FROM articles ORDER BY date DESC"); + $req = $bdd->prepare("SELECT ID, titre, date, auteur FROM articles ORDER BY date DESC"); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); diff --git a/html/login.php b/html/login.php index 293418fa..149315d4 100644 --- a/html/login.php +++ b/html/login.php @@ -11,7 +11,7 @@ if(isset($_POST['username']) && isset($_POST['password'])) { if(empty($_POST['username']) == false && empty($_POST['password']) === false) { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); - $req = $bdd->prepare("SELECT (ID, username, email, display_name) FROM admins WHERE (username = :username OR email = :username) AND password = :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'])); $req->execute();