views:

209

answers:

1

Hello everyone I am PHP Developer and developing website .in that i used Google map with the facility of select state and city. for select state and city i put two drop down.so now my problem is when i select state then i can not get value of city and both time whenever use select state and city i refresh the page and so after refreshing the page the value i got is incorrect and does not match the state with city...

i clarify again

  • Step 1:- select state (here page will refresh and then i will get value)
  • Step 2:- select city (here also will refresh and then i will get value))

problem :- on the base getting state id and city id i fire the query but result will unknown b'cz city id that does not in selected state actually that city is there

+1  A: 

If you don't get a result back from searching for the city and state then they must have changed the state drop down, so just clear the city drop down and repopulate it with the cities for the currently selected state.

Other options include storing the selected state of the drop down in a hidden field. Then you can compare it to the drop down value when the page posts back, which tells you if the user changed it.

Zarigani