diff --git a/html/upload.php b/html/upload.php index 16b613cf..58524217 100644 --- a/html/upload.php +++ b/html/upload.php @@ -8,7 +8,7 @@ if(isset($_SESSION['userid']) == false) { } if(isset($_POST['title'])) { - $filename = date("YmdHi"); + $filename = rand(100000, 999999); $destination = "../content/journal/" . $filename; $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $upload = $bdd->prepare("INSERT INTO articles (ID, titre, date, auteur) VALUES (:filename, :titre, :date, :auteur)");