Update 2 files

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

View File

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

View File

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