rsiedl has asked for the wisdom of the Perl Monks concerning the following question:

hi monks,

can anyone suggest a good module/method for dealing with a simple CGI form that interacts with a mysql database?

basically, the form needs to be able to handle creation of new records and editing of existing records.

i'm sure there must be an easy way to do this and am hoping someone can point me in the right direction.

cheers,
reagen

update: sorry i prolly didnt make myself clear in what i was looking for (end of a long day).

i've got CGI.pm adn DBI.pm already. really what i was looking for was something that could handle the following situation...

a form contains fields which have id's like 'tablename.field1', 'tablename.field2', 'tablename2.field', etc.
then the cgi script can just read in the params from the form and make the update(s) (new entries) in a DB

++ zaxo and marto cause you answered my 1st q perfectly :)

Replies are listed 'Best First'.
Re: CGI forms and DB interaction
by Zaxo (Archbishop) on Feb 22, 2007 at 12:53 UTC

    CGI.pm and DBI.pm work well together, with CGI collecting user input, and DBI speaking to the database.

    Higher-level web app frameworks like CGI::Application and Catalyst help organize your app. Some may have helper functions which simplify I/O and other necessities.

    After Compline,
    Zaxo

Re: CGI forms and DB interaction
by marto (Cardinal) on Feb 22, 2007 at 13:04 UTC