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'])) {