I am having a form written in php. In this form there is field named ‘State’ and the Options of this field are the names of the states.There is another field named ‘District’ whose Options are the names of the District. The Options of the these two fields are being fetched from the database. There are about 28 states and there are about 12 Districts for each state. Now what is want is that when someone selects the state, then all the Districts corresponding to that state automatically appear in the District field.
Share
you could use an ajax call
on the select put
onchange="changedist(this.value)"and use the script function
and call this values in your page
<div id="dist"> here will returns the distrctis of the file dist.php</div>and dist.php
so this will returns to your form page on the state change