Update file editpage.php

This commit is contained in:
Jan BELLON 2024-03-11 18:36:39 +00:00
parent d04da8d0b7
commit 188e04c73c

View File

@ -55,10 +55,10 @@ if(isset($fichier)) {
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
$req = $bdd->prepare("UPDATE articles SET classification = :classification, titre = :titre, resume = :resume WHERE ID = :article"); $req = $bdd->prepare("UPDATE articles SET classification = :classification, titre = :titre, resume = :resume WHERE ID = :article");
$req->bindParam(':classification', (int)$_POST['article-classification']); $req->bindParam(':classification', $_POST['article-classification']);
$req->bindParam(':titre', htmlspecialchars($_POST['article-titre'])); $req->bindParam(':titre', htmlspecialchars($_POST['article-titre']));
$req->bindParam(':resume', nl2br($_POST['article-resume'])); $req->bindParam(':resume', nl2br($_POST['article-resume']));
$req->bindParam(':article', (int)$_GET['article']); $req->bindParam(':article', $_GET['article']);
if($req->execute()) { if($req->execute()) {
$status = "Informations mises à jour"; $status = "Informations mises à jour";
} else { } else {