Guest User

Untitled

a guest
Jan 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <?php
  2. $getcat = "SELECT * FROM f_categories";
  3. $catresult = mysql_query($getcat);
  4. $getsubcat = "SELECT * FROM f_subcategories";
  5. $subcatresult = mysql_query($getsubcat);
  6. if(!$catresult)
  7. {
  8. echo ("Fatal Error.");
  9. }
  10. else
  11. {
  12. if(mysql_num_rows($catresult) == 0)
  13. {
  14. echo 'Forum Is Empty.';
  15. }
  16. else
  17. {
  18. while($dispcat = mysql_fetch_assoc($catresult))
  19. while($dispsubcat = mysql_fetch_assoc($subcatresult))
  20. {
  21. echo ("
  22. <table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\">
  23. <tr>
  24. <th align=\"left\"><font size=\"2\">$dispcat[cat_name]</font></th>
  25. <th align=\"left\"><font size=\"2\">Topics</font></th>
  26. <th align=\"left\"><font size=\"2\">Posts</font></th>
  27. <th align=\"left\"><font size=\"2\">Last Reply</font></th>
  28. </tr>
  29. <tr>
  30. <td align=\"left\"><font size=\"2\">$dispsubcat[subcat_name]</font></th>
  31. <td align=\"left\"><font size=\"2\">Topics</font></th>
  32. <td align=\"left\"><font size=\"2\">Posts</font></th>
  33. <td align=\"left\"><font size=\"2\">Last Reply</font></th>
  34. </tr>
  35. </table>
  36. ");
  37.  
  38. }
  39. }
  40. }
  41. ?>
Add Comment
Please, Sign In to add comment