Jump to content

Er, making forum, need help.


Unholy Prayer

Recommended Posts

Ok, I'm making my own forum software for my website and I am stuck.  I have it working somewhat, but it only displays the first category and the forums that are in it.  Can someone please help me fix this? Here is my forums page: http://www.mtechdev.com/bbultimate/index.php and here is my code:
[code]
<?php
require_once('config.php');

//Let's start the category selection.
$result = mysql_query("select * from categories");

while($r=mysql_fetch_array($result))
{
 
  $id=$r["id"];
  $name=$r["name"];
  $description=$r["description"];
 
 
  echo "<table align='center' width='95%' cellspacing='1' cellpadding='1' style='background-color: #000000;'>
          <tr>
  <td align='center' colspan='2' style='background-color: #e4e4e4;'><p align='left'><b>$name</b>- $description</p></td>
  </tr>";


//Now we find the forums for the selected category.
$result = mysql_query("select * from forums where cid = $id order by fid");


while($r=mysql_fetch_array($result))
{
 
  $fid=$r["fid"];
  $forumname=$r["forumname"];
  $fdescription=$r["description"];
  $cid=$r["cid"];
 
  echo "<tr>
        <td align='left' style='background-color: #e4e4e4;'>$forumname<br>$fdescription</td>
</tr>";
}
  echo "</table>";
 
}
 


?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/28292-er-making-forum-need-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.