Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Multiple form survey

by matthewb (Curate)
on Nov 09, 2003 at 15:27 UTC ( [id://305711]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Multiple form survey

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://305711]
help
Sections?
Information?
Find Nodes?
Leftovers?
    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.