refresh sub category combo box in php ?
Posted
by user298146
on Stack Overflow
See other posts from Stack Overflow
or by user298146
Published on 2010-03-20T20:13:55Z
Indexed on
2010/03/20
22:21 UTC
Read the original article
Hit count: 201
Hello
i need to refresh combo box (sub category ) related to what i choose in main category combo box , for example if i choose "chicken" in main category , the value of sub category will be "grilled chicken" , " fried chicken " ? how should i do this ?
<select name="categorylist" id="categorylist">
<?
$sql_query= mysql_query("select category_id,category_name, from categories");
while($fetch= mysql_fetch_array($sql_query))
{ ?>
<option value= " <? echo "$fetch[category_id];" ?> " selected="selected"><? echo "$fetch[category_name]"; ?> </option>
<?
}
?>
what should i put in subcategory ?
© Stack Overflow or respective owner