Re: PHP- Dependant dropdown based on Mysql queries

From: Date: Mon, 30 Aug 2004 19:18:42 +0000
Subject: Re: PHP- Dependant dropdown based on Mysql queries
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195189@lists.php.net to get a copy of this message
On Mon, 2004-08-30 at 13:42, Francisco Puente XFMP (QA/EMC) wrote: > Hi All, > I'm trying to generate a PHP page with 3 or 4 dropdown menus, each of one dependant upon > each other, that means: > #2 dropdown should change upon selecting something on dropdown #1, #3 should change based on > the selection at #2 to finally submit the desired query. Each dropdown menu should be generated from > a mysql query based on the previous selection. > I need to generate mysql queries based on each dropdown selection and the page should reload > the content for the next dropdown menu. I couldn't yet figure out how to accomplish this. > Let me know if I make myself clear enough :) > Any help is very welcome!! If no page reloading is a requirement you will have to use javascript. You can pull all the possible select options with one query, then create new javascript Option objects for each. Then populate the select fields based on the previous select field's selection. -- Greg Donald

« previous php.general (#195189) next »