From 6f2fc6251da3c1cc6f815d240a1d22099d4fe2d2 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Thu, 7 Mar 2024 02:41:13 +0000 Subject: [PATCH] Update file upload.php --- html/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/upload.php b/html/upload.php index 9fd09f2f..98d8be62 100644 --- a/html/upload.php +++ b/html/upload.php @@ -7,7 +7,7 @@ if(isset($_SESSION['userid']) == false) { die(); } -if(isset($_POST['titre'])) { +if(isset($_POST['titre']) && isset($_FILES['file'])) { $filename = rand(100000, 999999); $destination = "/var/www/e59/content/journal/" . $filename . ".md"; $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); @@ -69,7 +69,7 @@ if(isset($_POST['titre'])) {

Publier un article

-
+