prepare("INSERT INTO articles (ID, titre, date, auteur) VALUES (:filename, :titre, :date, :auteur)"); $bdd->bindParam(':filename', $filename); $bdd->bindParam(':titre', htmlspecialchars($_POST['titre'])); $bdd->bindParam(':auteur', $_SESSION['display_name']); if (isset($_POST['date']) && empty($_POST['date']) == false) { $bdd->bindParam(':date', htmlspecialchars($_POST['date'])); } else { $bdd->bindParam(':date', date()); } $insertcred->execute(); move_uploaded_file($_FILES['file']['tmp_name'], $destination); } ?> <?=$title?>

Publier un article