I am a bit confused on my following problem.
In my current web based application i am having two dropdown.
<select name="country">
<option value="">All</option>
<option value="">India</option>
<option value="">China</option>
</select>
And
<select name="state">
<option value="">All</option>
<option value="">state1</option>
<option value="">state2</option>
</select>
Now what i need to do is, when ever i select India from country then second dropdown should show all the Indian state and when i choose china, it should show all chinese state in second dropdown.
I am using two tables for both country and state with following fields
Table country with columns: country_id, country_name
Table state with coulmn: state_id, country_id, state_name
I am storing the state name based on country_id in state table.
Please Suggest me.