Re: How can I filter options?

From: Date: Fri, 28 May 2004 07:36:19 +0000
Subject: Re: How can I filter options?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187096@lists.php.net to get a copy of this message
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.


« previous php.general (#187096) next »