Update 2 files

- /html/journal.php
- /html/login.php
This commit is contained in:
Jan BELLON 2024-03-07 01:28:36 +00:00
parent 23e26a287c
commit d134051f4d
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

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