On Tue, 1 Apr 2003 20:21:57 -0600
massimo <[EMAIL PROTECTED]> wrote:

> hey everyone,
> I have this select form which get filled dynamically with all my
> tables in my database. It depends on which one I choose from the drop
> down menu, that clicking submit it displays the right table..
> now, I need to have a form on the page that would let me insert new 
> records. Of course I don't want to make a form for each table, so I 
> would like to change the entries and values of the insert form in 
> relation to the table I choose from the drop down form above
> mentioned. Of course the "id" and "created" are NULL because they
> should get filled automatically.
> thanks for your help.
> mas


We recently did something very similar to this for a client.

One approach that you could take is to parse the results from "describe
table_name" (that statement is for Mysql but similar things can usually
be done for other database engines) for the table selected in the List

This really is fairly straight forward.

You have isolated the table name that you are interested in... Great
Execute a database query to get the field description for the table.

Decide what action you wish to take for each field.
For example, radio buttons for an enum field, hidden for a primary key
and created by.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to