Experts, I have the following dropdown menu which is populated by content or categories (with catID being the category ID) from the database. What I want to do though is when an item in the drop down list is selected, I want to show dynamic content under it. BTW, I must not emphasize on "dynamic" too much because it may seem like a DHTML thing going on here. :quiet:
For example, if a user selects a certain item/category in the list, I want content such as coupons in the DB which have the same catID as the category selected showing up.
The coupons are discreetly placed in the DB table "coupons" with the category ID being catID and...for eg:
catID --- couponname --- couponinfo --- expiredate
If you are going to include any kind of javascript, please write them as well.
Thanks.
Here is the code I am starting off with:
<form name="myform">
<select name="selectID" size=10 >
<? $resultcat = mysql_query("SELECT * FROM Category");
while ($myrow2 = mysql_fetch_array($resultcat)) {
?>
<?
printf("<option value=%s>%s</option>", $myrow2["catID"],$myrow2["name"]);
}
?></select></form>