Update file editpage.php

This commit is contained in:
Jan BELLON 2024-03-07 16:43:12 +00:00
parent 5707e905f5
commit fb3a037230

View File

@ -96,6 +96,17 @@ if(isset($fichier)) {
}
}
}
echo "</div><div>";
$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 "<a href='?article=" . $row['ID'] . "'><div>" . $row['titre'] . "</div></a>";
}
}
}
?>
</div>