Hello,
I have a category list and sub categories for each category. I have a php file that will list all the subcategories under a main category. However when I chose a subcategory, I would like to have the same subcategory list shown. For example: I have a category called "ART", whith 3 subcategories, "Prints, Posters & Sculptures". When I'm under "ART" all three subcategories show up, but when I select a subcategory such as "Prints", the three subcategories do not show. Is this a matter of using a if else statement? Or something different. Here is my code.
<?php
$subcat = mysql_query("SELECT name, id FROM categories WHERE parent_id = '$catid' ");
while ($subcatrow = mysql_fetch_array($subcat))
{
echo "<b>" . '<a href="http://localhost/getproducts.php?catid='.$subcatrow['id'].'" style="color:black; font-size:14pt">'.$subcatrow['name'].'</a></b><br>';
}
?>
Any Help would be great, Thanks.
Jeremy