Syntactic Confectionery Delight | |
PerlMonks |
Re: Multiple form surveyby matthewb (Curate) |
on Nov 09, 2003 at 20:27 UTC ( [id://305711]=note: print w/replies, xml ) | Need Help?? |
I appologize for my ignorance, but I'm still new at this!If you are asking for help, you are not ignorant. You appear to be attempting to write a multi-form CGI application based upon a bunch of predetermined templates. The difference between you and the people who are really good at this is that they know what not to do! The parsing of HTTP query strings in your own code is considered a no-no in professional circles since it is handled by the CGI module, which comes as standard in your Perl installation. Look up the details for the param function and you can do away with your read_query_string() function altogether. While it is difficult to give concrete advice on the architecture of your whole application, I can heartily recommend CGI::Application as being an excellent way to generalise its different stages into functions. You are also well-advised to consider some kind of templating solution for organising the HTML pages you have prepared. I have had a great deal of success with Template Toolkit but a number of other solutions exist. Your script shows all three forms at the same time because the first two lines tell it to do so - you need some stuff in between them to stop this happening ;) You need to do a little bit of reading through some examples, I reckon, but what you are doing - trying to get something working by trial and error - is definitely a step in the right direction and you have found the right place to ask more specific questions. MB
In Section
Seekers of Perl Wisdom
|
|