From 50a03ab7cf875655f57ab80dadf8390b31f5396b Mon Sep 17 00:00:00 2001 From: thaaoblues Date: Sat, 11 Nov 2023 20:33:14 +0100 Subject: [PATCH] =?UTF-8?q?validation=20de=20pdfs=20et=20specification=20d?= =?UTF-8?q?e=20corrig=C3=A9=20:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bdd.php | 4 ++-- index.php | 2 ++ readme.md | 2 +- televerser.php | 5 +++++ validation.php | 12 +++++++++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/bdd.php b/bdd.php index e420ecb..9b06372 100644 --- a/bdd.php +++ b/bdd.php @@ -52,10 +52,10 @@ function ajouter_doc($request){ die("Connection failed: " . $conn->connect_error); } - $sql = "INSERT INTO ensembles (commentaire_auteur) VALUES(\"".htmlspecialchars($request['commentaire_auteur'])."\")"; + $sql = "INSERT INTO ensembles (commentaire_auteur,corrige_inclu) VALUES(?,?)"; try{ - $conn->execute_query($sql); + $conn->execute_query($sql,array(htmlspecialchars($request['commentaire_auteur']),boolval($request["corrige_inclu"]))); saveFilesFromPost($request,mysqli_insert_id($conn)); }catch(Exception $e){ echo(json_encode(["status"=>"0","msg"=>$e->getMessage()])); diff --git a/index.php b/index.php index 83a1bbf..9aa2c7c 100644 --- a/index.php +++ b/index.php @@ -23,6 +23,8 @@ + + Téléverser des documents