Update file upload.php
This commit is contained in:
parent
ad0d55e5ce
commit
6f2fc6251d
@ -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'])) {
|
||||
<div>
|
||||
<div>
|
||||
<h1>Publier un article</h1>
|
||||
<form action="#" method="post">
|
||||
<form action="#" method="post" enctype="multipart/form-data>
|
||||
<div>
|
||||
<div><input type="text" name="titre" placeholder="Titre de l'article" required></div>
|
||||
<div><input type="date" name="date"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user