Update file upload.php

This commit is contained in:
Jan BELLON 2024-03-07 02:08:50 +00:00
parent 1182bb1f29
commit 5fd2d3e4e7

View File

@ -16,9 +16,9 @@ if(isset($_POST['title']) && isset($_FILES['file'])) {
$upload->bindParam(':titre', htmlspecialchars($_POST['titre']));
$upload->bindParam(':auteur', $_SESSION['display_name']);
if (isset($_POST['date']) && empty($_POST['date']) == false) {
$bdd->bindParam(':date', htmlspecialchars($_POST['date']));
$upload->bindParam(':date', htmlspecialchars($_POST['date']));
} else {
$bdd->bindParam(':date', date());
$upload->bindParam(':date', date());
}
if($upload->execute()) {
$status = "Uploaded";