Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

CGI forms and DB interaction

by rsiedl (Friar)
on Feb 22, 2007 at 12:43 UTC ( [id://601540]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://601540]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2026-02-19 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.