Ok. I'm trying to make some halfway functional forums. Now, I have the catagories in the database, and pulling from it in my forum.php. What I want, is for the user to click the category name, and it drops down and lists the forums in that category. I assumed it would use this

Code:
<a href="forums2.php?cat_id=<? echo $cat_id ?>
so I already put it in, as you can see. Yes, on the database the forums have what category id they are assigned to.

If you need a visual of what I'm talking about, here's a pic (of what's output'd from the code below):

here

Any push to how to do this would be greatly appreciated. Thanks fellas

(sorry its a mess, I'm learning)

Code:
<TABLE WIDTH="100%" border="1" CELLSPACING="0" CELLPADDING="3" bgcolor="#D4D8D6">
  <TR ALIGN="left">
     <TD WIDTH="2%" CLASS="boardheading" Background="images/top.gif">+
     <TD WIDTH="73%" CLASS="boardheading" ALIGN="center" Background="images/top.gif">Category Titles
     <TD WIDTH="5%" CLASS="boardheading" ALIGN="center" Background="images/top.gif">Topics
     <TD WIDTH="5%" CLASS="boardheading" ALIGN="center" Background="images/top.gif">Posts
     <TD WIDTH="15%" CLASS="boardheading" ALIGN="center" Background="images/top.gif">Last post
  </tr>

<?php

require 'db_connect.php';

$query="SELECT * FROM categories ORDER BY cat_order ASC";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

if ($num==0) {
echo "No Entries.";
} else {

if ($num>25) {
$to=25;
}else{
$to=$num;
}

}

$i=0;
while ($i < $to) {

$cat_id=mysql_result($result,$i,"cat_id");
$cat_title=mysql_result($result,$i,"cat_title");

?>

  <TR ALIGN="left">
     <TD><a href="forums2.php?cat_id=<? echo $cat_id ?>" style="color:#333333;">+</a><TD><a href="forums2.php?cat_id=<? echo $cat_id ?>" style="color:#333333;"><? echo $cat_title ?></a><TD>10<TD>100<TD>Phases
 	
<?	
$i++;
}

echo "<TR ALIGN='left'>
  <TR>
</TABLE>";

?>