First compobox value should control the next compobox in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
azadms
Forum Newbie
Posts: 5
Joined: Sat Oct 24, 2009 7:28 am

First compobox value should control the next compobox in PHP

Post by azadms »

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 :

<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['district'];?>"><?=$new12['district'];?></option>

<? } ?>
</select>
Post Reply