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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.