'; $sql = "SELECT cat_name, cat_description FROM categories WHERE cat_id = " . mysqli_real_escape_string($dbc, $_GET['id']); $result = mysqli_query($dbc, $sql); if (!$result) { die('Error trying to display category: ' . mysqli_error($dbc)); } // Display category name and description if (mysqli_num_rows($result) == 0) { echo 'This category does not exist'; } else { while ($row = mysqli_fetch_assoc($result)) { echo '
Topic | Latest Post |
---|---|
';
echo '' . $row['topic_subject'] . ''; echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['topic_date'])) . ' | by cflip 01-22-2021 9:34 |