diff --git a/html/editpage.php b/html/editpage.php index fd05235d..469a1fa1 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -55,10 +55,10 @@ if(isset($fichier)) { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("UPDATE articles SET classification = :classification, titre = :titre, resume = :resume WHERE ID = :article"); - $req->bindParam(':classification', $_POST['article-classification']); - $req->bindParam(':titre', $_POST['article-titre']); - $req->bindParam(':resume', $_POST['article-resume']); - $req->bindParam(':article', $_GET['article']); + $req->bindParam(':classification', (int)$_POST['article-classification']); + $req->bindParam(':titre', htmlspecialchars($_POST['article-titre'])); + $req->bindParam(':resume', nl2br($_POST['article-resume'])); + $req->bindParam(':article', (int)$_GET['article']); if($req->execute()) { $status = "Informations mises à jour"; } else { @@ -151,11 +151,11 @@ if(isset($fichier)) { echo '
'; echo ''; - echo ''; + echo ''; } } echo "