From fb3a037230de8e9f2a3d9012909187a3572a855d Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Thu, 7 Mar 2024 16:43:12 +0000 Subject: [PATCH] Update file editpage.php --- html/editpage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/html/editpage.php b/html/editpage.php index 60215ed2..77d5ff04 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -96,6 +96,17 @@ if(isset($fichier)) { } } } + echo "
"; + $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); + $req = $bdd->prepare("SELECT ID, titre FROM articles ORDER BY date DESC LIMIT 10"); + $req->execute(); + $resultat = $req->fetchAll(PDO::FETCH_ASSOC); + + if ($resultat) { + foreach($resultat as $row) { + echo "
" . $row['titre'] . "
"; + } + } } ?>