|We don't bite newbies here... much|
HTML::Template Form Usageby bladx (Chaplain)
|on Jan 03, 2002 at 04:16 UTC||Need Help??|
bladx has asked for the
wisdom of the Perl Monks concerning the following question:
I have been working on a small CGI script lately, and things have been going well. However, I have come up against a sort of problem.
My main goal so far of this "project" is to simply: Retrieve data from MySQL via the DBI module -> display this data in HTML form -> make a form for someone to input a row in the MySQL DB -> display contents of DB again in HTML form.
So far, everything but one of those parts of the project so far are completed. The part I don't know how to do yet is the form part. I am using HTML::Template for all of the HTML part, and am not sure how I can use a form with this (since I don't want to mirror too many cases or loops in the template that could have been done in the acutal .pl/.cgi program.
I did take a long look at this node: Q / A and HTML::Template techniques... and got some ideas as to how to do this *kind of*. But I don't know quite where to go with the code I have come up with which is displayed here:
Also here is the .tmpl file:
Hopefully my question(s) are clear enough to answer, or at least to point to where I can find out how to do it in a correct manner. Thanks for any and all help or comments regarding this question!