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();