prepare('SELECT * FROM discussion_forums WHERE id = ?'); $stmt->execute([$forum_id]); $forum = $stmt->fetch(); if (!$forum) { header('Location: forums.php'); exit(); } // Fetch threads in this forum $stmt = $pdo->prepare( 'SELECT t.*, u.username FROM discussion_threads t JOIN users u ON t.user_id = u.id WHERE t.forum_id = ? ORDER BY t.created_at DESC' ); $stmt->execute([$forum_id]); $threads = $stmt->fetchAll(); ?>

Create a New Thread

Threads

No threads in this forum yet. Be the first to post!
By on