summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorCflip <36554078+cflip@users.noreply.github.com>2021-01-24 13:19:07 -0700
committerCflip <36554078+cflip@users.noreply.github.com>2021-01-24 13:19:07 -0700
commit2d39a708bdd88dc1601badbc2f58843b757996e9 (patch)
tree65be372b9dbf6e07751c226be1e2537844292cc3 /index.php
parentfcd4a840ab072d8d2956f15b697b81aac415ba06 (diff)
parent5032ee6dde5b33846570d9ea7af6b508755c708b (diff)
Merge branch 'master' of https://github.com/cflip/cflip_forums
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/index.php b/index.php
index 01acd33..2a1c633 100644
--- a/index.php
+++ b/index.php
@@ -41,8 +41,13 @@ include_once 'header.php';
echo '<tr><td class="left">';
echo '<h4><a href="category.php?id=' . $row['cat_id'] . '">' . $row['cat_name'] . '</a></h4>';
echo $row['cat_description'];
- echo '</td><td class="right">' . $thread['thread_subject'] . '<br>';
- echo '<small>by <b>' . $thread['user_name'] . '</b></small></td></tr>';
+ if ($thread) {
+ echo '</td><td class="right">' . $thread['thread_subject'] . '<br>';
+ echo '<small>by <b>' . $thread['user_name'] . '</b></small></td></tr>';
+ } else {
+ $no_threads_msg = 'There are no threads in this category yet.';
+ echo '</td><td class="right"><small>'. $no_threads_msg .'</small></td>';
+ }
}
mysqli_stmt_close($stmt);
@@ -75,4 +80,4 @@ include_once 'header.php';
</table>
<?php
include_once 'footer.php';
-?> \ No newline at end of file
+?>