Why don't you have your script do a desc on the table you pass to it, parse
the results, and populate the data needed for your form building class?
----- Original Message ----- 
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Friday, May 14, 2004 9:37 AM
Subject: [PHP] dynamically building insert/update forms from db


> I was up late last night creating insert and update forms for tables in my
> db and knew there had to be a better way.  I do have a class that will
> generate forms but I still have to create each input..i.e
> $forms->inputBox(), etc.  I want to be able to pass in a table name and
have
> a form returned to me.  How do other's handle this?  My first thought is
to
> have an xml file that maps the database columns to form elements such as
> text, radio, etc then when the class is called, it searches the xml file
for
> the passed in name and builds the appropriate form.  Is this the best way?
>
>
> Thanks,
> Eddie
>
>  WARNING:  The information contained in this message and any attachments
is
> intended only for the use of the individual or entity to which it is
> addressed.  This message may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  It may also
> contain trade secrets and other proprietary information for which you and
> your employer may be held liable for disclosing.  You are hereby notified
> that any unauthorized dissemination, distribution or copying of this
> communication is strictly prohibited.  If you have received this
> communication in error,  please notify [EMAIL PROTECTED] by E-Mail and
then
> destroy this communication in a manner appropriate for privileged
> information.
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>

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

Reply via email to