Here is my categories page:

<html><head><title>Categories</title></head><body>
<br><Br><br>

<?php
include("articles.inc");
mysql_select_db('petesmc_articles');

$write = mysql_query("SELECT ID, Cat, Description FROM category");
if (!$write) {
echo("<P>Error retrieving cateogry from database!<BR>".
"Error: " . mysql_error());
exit();
}

while ($cat= mysql_fetch_array($write)) {
$id = $cat["ID"];
$name = $cat["Cat"];
$description = $cat["Description"];
echo("<p><a href='subcats.php?id=$id'>$name</a> " .
"</p><br><font size='1'>$description</font>");
}
?>

</body></html>


My question is, what would i write on the page called subcats? AS you can see, i have a link to it down the bottom. In table subcateogry i have the fields:

ID, CID, SubCat, Description

CID is category ID, which it belongs to.

So how would i show all the subcateogories within a selected category?
<Edited by petesmc on 01-04-2001 at 10:53 AM>