I would like to use a single php page to display first my product categories, have the user click which one s/he wants, then refresh the page with the sub-categories for the picked category, have the user click which one s/he wants, then display a detail list of the matching products. (clear as mud, right?)
Here's my current code thus far...
$result = mysql_query("SELECT Make FROM Products GROUP BY Make",$db);
echo "<ul>\n";
while ($myrow = mysql_fetch_row($result)) {
printf("<li><font face=Arial size=2><a href=/test.php?make=%s>%s</a></font></li>\n",$myrow[0],$myrow[0]);
}
echo "</ul>\n";
This gives me a nicely formatted list of main categories, but I am having troubles figuring out a clean efficient way of refreshing this page with the new subcategories. Any suggestions would be greatly appreciated. Thanks.