Update file upload.php

This commit is contained in:
Jan BELLON 2024-03-07 02:13:53 +00:00
parent 470507eccb
commit 8386c4091d

View File

@ -11,7 +11,7 @@ if(isset($_POST['title'])) {
$filename = date("YmdHis");
$destination = "../content/journal/" . $filename;
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
$upload = $bdd->prepare("INSERT INTO (articles ID, titre, date, auteur) VALUES (:filename, :titre, :date, :auteur)");
$upload = $bdd->prepare("INSERT INTO articles (ID, titre, date, auteur) VALUES (:filename, :titre, :date, :auteur)");
$upload->bindParam(':filename', $filename);
$upload->bindParam(':titre', htmlspecialchars($_POST['titre']));
$upload->bindParam(':auteur', $_SESSION['display_name']);