Posted by Manuel Lemos on 01/03/06 01:16
Hello,
on 12/29/2005 10:26 AM powerx said the following:
> I have an SQL database
>
> ID BRAND
> 1 Apples
> 2 Pears
> 3 Oranges
> 4 ...
> 5 ...
>
> What is the easiest way of getting the SQL "Brand List" into a dropdown menu
> in my HTML / PHP page. It should automatically update when new items are
> added?
You may want to take a look at this forms generation class that comes
with a plug-in to build select inputs from SQL database queries with
MySQL or many other databases.
http://www.phpclasses.org/formsgeneration
It can even link several select inputs switching groups of objects that
may be retrieved from the server without refreshing the page using AJAX.
Here is an example:
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/
[Back to original message]
|