RE: [PHP] PHP- Dependant dropdown based on Mysql queries
| From: | Greg Donald | Date: | Mon, 30 Aug 2004 20:24:08 +0000 |
| Subject: | RE: [PHP] PHP- Dependant dropdown based on Mysql queries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195201@lists.php.net to get a copy of this message | ||
On Mon, 2004-08-30 at 14:28, Francisco Puente XFMP (QA/EMC) wrote:
> Hi Brent,
> I believe this is the way to go, but since I'm not a javascript guy I would like to get
> some php help for doing this.
> I you know some javascript can you please post some code for this task?
> Someone else proposed to query ALL the information from the database to populate the
> javascript code to be used but I disregard this since the data from the database is pretty big and a
> lot of user accessing at the sime will put the load on the roof. I'm sure there is an easier
> way to go..
> Thanks a lot!
That someone, being me, also justified the statement with "if not
reloading the page is a requirement".
If you can reload the page after each option is selected then you don't
even have to use javascript. When I coded one of these a couple years
back it was in the spec that the page would not reload.
In addition, a single select costs less than multiple selects with where
clauses.
Good luck.. however you decide to code it.
--
Greg Donald