Community Discussions
+ Start a New Topic
query("SELECT * FROM threads ORDER BY created_at DESC");
$threads = $stmt->fetchAll();
if (!$threads) {
echo '
';
}
}
?>
No discussions found. Be the first to start a topic!
';
} else {
foreach ($threads as $row) {
echo '
'.htmlspecialchars($row['title']).'
Started by '.htmlspecialchars($row['author']).' on '.date('M d, Y', strtotime($row['created_at'])).'