I have created a compobox and selected District from address table. I have to take the district name as a key and filter "towns" from address table and it should be displayed in the second compobox. Anyone help me what code I can use for second compobox?

The code used for the first one is working :

<form name="select_category" action="../select_category.php" method="post" >
<select name="cate" id="cate" style="width:180px;" >
<option value="select">Select District</option>
$new=mysql_query("select * from address order by district asc");
while ($new12=mysql_fetch_array($new))
<option value="<?=$new12;?>"><?=$new12;?></option>
<? } ?>

Any one give me how to write the second one?

8 Years
Discussion Span
Last Post by OmniX

If you want to do any client side changes you will require AJAX/Javascript to get it done else if you want to use PHP I guess you could submit the previous combo box value and refresh the page based on the attribute onselect or onchange etc. Hope that helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.