prepare("SELECT id, username, bio, profile_picture FROM utilisateurs WHERE id = ?"); $stmt->execute([$id]); $u = $stmt->fetch(PDO::FETCH_ASSOC); if (!$u) { echo "Utilisateur introuvable."; exit; } $stmt2 = $pdo->prepare("SELECT id, title, content, image_url, date_creation FROM posts WHERE user_id = ? ORDER BY date_creation DESC"); $stmt2->execute([$id]); $posts = $stmt2->fetchAll(PDO::FETCH_ASSOC); ?>
= nl2br(htmlspecialchars($u['bio'] ?? '')) ?>
Aucun article publié.