Hello Dunj,

first query the db for all provinces. Then let the user select his province and make the select field an automated jump field (onselct="document.location.href='xxsite'")
Then query the db again with the province and display the cities.


However think about it how many cities you might have to display. I think it is easier to query the db directly for the city name and let the person select the city in question.

good luck,

Merlin

Dunj wrote:

Hi, every one.
I am now caught in a difficulty.
I create a form to query the database. There are two 'select' items in the form.
For example, I refer to the first 'select' item as $province and the second as $city.
When I select a item of $province, I wish $city contains only the cities of the selected
province.
I think I should use the java script, but I don't know how to use it.
Thanks in advance.



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to