Of course you can make a database dynamic combobox. You can fill up the
first one with table names and the second with the table fields the user had
chosen. I know two ways of doing this :
1st) Only php code - You fill the tables combobox and link a call to a php
script to fill up the fields combobox according to the user choice.

2nd) Php + JavaScript code - You fill the tables combobox and create an
array which every element is an array itself, containing the fields of the
parent table. Link a call to a JavaScript function to fill up the fields
combobox according to the user choice.

The second one takes more time to download the page but fills the fields
combobox faster than the first. If the database tables are updated very
often the second option can't be used.




-----Mensagem Original-----
De: Miguel Loureiro <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 15 de janeiro de 2001 14:07
Assunto: [PHP-DB] user choices Vs infoDB ???

I would like to create 2 dynamic ComboBox, but I would like to take into
account the user choice,i.e:
1 - in my first combobox appears the information about tables available in
certain database(db);
2 - the user should select one table name and automatically the respective
fields of that table appear in the second combobox. Is it possible?
I know the db, and I can insert all table,fields names directly to the
respectives combo, but i would like to make it in that way, because, who
knows, tomorow ma db is changed...
I dont think thats possible, I'm just confirm...
Miguel Loureiro

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to