Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $getcat = "SELECT * FROM f_categories";
- $catresult = mysql_query($getcat);
- $getsubcat = "SELECT * FROM f_subcategories";
- $subcatresult = mysql_query($getsubcat);
- if(!$catresult)
- {
- echo ("Fatal Error.");
- }
- else
- {
- if(mysql_num_rows($catresult) == 0)
- {
- echo 'Forum Is Empty.';
- }
- else
- {
- while($dispcat = mysql_fetch_assoc($catresult))
- while($dispsubcat = mysql_fetch_assoc($subcatresult))
- {
- echo ("
- <table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\">
- <tr>
- <th align=\"left\"><font size=\"2\">$dispcat[cat_name]</font></th>
- <th align=\"left\"><font size=\"2\">Topics</font></th>
- <th align=\"left\"><font size=\"2\">Posts</font></th>
- <th align=\"left\"><font size=\"2\">Last Reply</font></th>
- </tr>
- <tr>
- <td align=\"left\"><font size=\"2\">$dispsubcat[subcat_name]</font></th>
- <td align=\"left\"><font size=\"2\">Topics</font></th>
- <td align=\"left\"><font size=\"2\">Posts</font></th>
- <td align=\"left\"><font size=\"2\">Last Reply</font></th>
- </tr>
- </table>
- ");
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment