Re: Dependant listboxes
| From: | Manuel Lemos | Date: | Fri, 11 Jan 2008 01:12:25 +0000 |
| Subject: | Re: Dependant listboxes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267058@lists.php.net to get a copy of this message | ||
Hello,
on 01/10/2008 02:43 PM Humani Power said the following:
> Hi everybody.
> I have a page with 3 combo box that contains rows from an oracle database.
> What I want to do, is to make those list dependant one from another.
>
> Let say that I have the combo boxes on a page1.php, then on change the first
> list box, reload the page1.php and make the selection of the second listbox,
> on change on the second
> box, the third listbox will be filled. Then, pressing the submit
> button, I want to go to the
> page2.php
>
> I dont want to use javascript. Does anyone knows where can I find an example
> to implement the dependant lists?
This popular PHP forms generation and validation class has a linked
select plug-in to do precisely that.
http://www.phpclasses.org/formsgeneration
The basic version use alternative groups of option values taken from
arrays, but there are also variant versions of the plug-in that take
options from database query results.
Here is a live example of the version that uses arrays:
http://www.meta-language.net/forms-examples.html?example=test_linked_select
There is one variant that supports MySQL and two other variants that
support many databases, including Oracle, using either the Metabase or
PEAR::MDB2 database independent APIs.
Here you may watch a tutorial video that explains about this and other
plug-ins of this forms class:
http://www.phpclasses.org/browse/video/1/package/1/section/plugin-linked-select.html
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/