Update 2 files
- /html/journal.php - /html/login.php
This commit is contained in:
parent
d134051f4d
commit
a709c9d447
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user