This commit is contained in:
No4m
2025-11-02 14:05:02 +01:00
parent 9187f41e17
commit f2b78086dd
13 changed files with 122 additions and 74 deletions

View File

@@ -1,5 +1,4 @@
<?php
global $pdo;
require 'include/db.php';
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$stmt = $pdo->prepare('SELECT * FROM articles WHERE id = ?');
@@ -7,6 +6,7 @@ $stmt->execute([$id]);
$article = $stmt->fetch();
if (!$article) { http_response_code(404); die('<h1>404 - Article introuvable</h1>'); }
?>
<!DOCTYPE html>
<html lang="fr">
<head><meta charset="UTF-8"><title><?= htmlspecialchars($article['titre']) ?></title></head>