Re: <SELECT> tag and PHP
| From: | Manuel Lemos | Date: | Fri, 16 Jun 2006 19:01:21 +0000 |
| Subject: | Re: <SELECT> tag and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238169@lists.php.net to get a copy of this message | ||
Hello,
on 06/16/2006 04:46 AM weetat said the following:
> I have a <SELECT> for country in the php file . I would like to load
> the country and city belong to the country dynamically from the database.
>
> Anyone have ideas how to do it ?
Take a look at this forms class. It comes with a linked select custom
input plug-in that does exactly what you want.
It can switch the group of options of one select input when another
linked input changes its value.
It can use static arrays to define groups of options or retrieve them
dynamically from a database using AJAX.
Here is the class
http://www.phpclasses.org/formsgenaration
Here is an example of a form with linked select inputs generated with
the class:
http://www.phpclasses.org/browse/view/html/file/9879/name/test_linked_select_page.html
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/