Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Justin Patrin
Ben Ramsey wrote: CB> I believe there is a PEAR library package that does this. You might CB> want to do some research to see if it fits your needs. Yes, there is. Check out PEAR::DB or PEAR::MDB which both have good classes for preparing INSERT and UPDATE statements, as well as for finding ou

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Ben Ramsey
CB> I believe there is a PEAR library package that does this. You might CB> want to do some research to see if it fits your needs. Yes, there is. Check out PEAR::DB or PEAR::MDB which both have good classes for preparing INSERT and UPDATE statements, as well as for finding out information about

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Chris Boget
> I believe there is a PEAR library package that does this. You might want to > do some research to see if it fits your needs. Take a look at the following: http://pear.php.net/package/DB_DataObject_FormBuilder Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Chris Boget
> 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,

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread John W. Holmes
From: "Edward Peloke" <[EMAIL PROTECTED]> > how would it know that I want the numeric in the db to be a menu item or > yes, no on the form? How do you know whether you want it to be a "menu item" or "yes, no"? Now program the same logic into your function/class that handles creating your form...

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Steve Douville
"Steve Douville" <[EMAIL PROTECTED]>; "Php-General" <[EMAIL PROTECTED]> Sent: Friday, May 14, 2004 10:51 AM Subject: RE: [PHP] dynamically building insert/update forms from db > desc? > > how would it know that I want the numeric in the db to be

RE: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Edward Peloke
insert/update forms from db 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" &

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread Steve Douville
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 Subjec

Re: [PHP] dynamically building insert/update forms from db

2004-05-14 Thread raditha dissanayake
Edward Peloke wrote: 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 h