Automatically create SQL table from existing form?
I've been handed a bunch of HTML forms that currently have the ACTION set to a scritp send email with the values. I want to switch these to stuffing into a database, but would rather not hand-examine the forms to find the fields and field sizes and create SQL tables manually. I know there are sophisticated Zope products to create editing forms from existing SQL tables (Znolk and family). Great, but not what I need here. Is there a simple script someone has which looks at an HTML form, finds the <input ..> and <textareas ..> and crafts a SQL table from it? Thanks! -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
Grep and vi? ;) Seriously, I do that from time to time (I'm converting a lot of old Perl CGI.pm forms to use Zope..) ..and simply search for all the NAME's, strip away the fluff and build my create table script around the variables.. I shouldn't take *that* long.. There may be a product to do something like that but I'd be surprised as it's (I think) not super common to only use Zope to email a form.. -Chris
I've been handed a bunch of HTML forms that currently have the ACTION set to a scritp send email with the values.
I want to switch these to stuffing into a database, but would rather not hand-examine the forms to find the fields and field sizes and create SQL tables manually.
I know there are sophisticated Zope products to create editing forms from existing SQL tables (Znolk and family). Great, but not what I need here.
Is there a simple script someone has which looks at an HTML form, finds the <input ..> and <textareas ..> and crafts a SQL table from it?
Thanks!
On Thu, 7 Mar 2002, Chris Beaumont wrote:
Grep and vi?
;)
Seriously, I do that from time to time (I'm converting a lot of old Perl CGI.pm forms to use Zope..)
..and simply search for all the NAME's, strip away the fluff and build my create table script around the variables.. I shouldn't take *that* long..
There may be a product to do something like that but I'd be surprised as it's (I think) not super common to only use Zope to email a form..
-Chris
Yep. I was just hoping that someone had hacked out a python/perl/pwhatever script to do this with a little less vi-ing. Thanks! -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
participants (2)
-
Chris Beaumont -
Joel Burton