Lori713

You have several choices.

  1. If I recall correctly CGI has a 'sticky mode' so it can allow you to populate a second form based on the response to the first form. This is suitable for very simple situations.
  2. You can't pass just @names to HTML::Template - you have to pass it a reference to the entire HASH, in fact you can even pass it the object and it will use the param method to extract the HASH!
  3. A session system is good too, as you say TIMTOWTDI. If you need the capability of a session managed application, CGI::Session makes it very easy. Fortuantely most of the time my apps are session managed so the I can tuck things in a session and get them back as has already been described to you.
  4. Data::FormaValidator and its close cousin HTML::FillInForm can be used to implement the same sort of thing with very flexible validation along the way.
  5. POST method is safer than GET, in only a very minor way. But the sue of a sessioning system will allow the variables never to leave your server, so you don't have so much to worry about. It also means you can store other incidental information along the way as well and you can expire not only the entire session, but a part of the session.
    For example, my users have to log-in, but after 30 minutes of no usage they are automatically logged-out. By using the expire method of CGI::Session you can have a session which persists (as mine do) but the user needs to log back in again after a period of inactivity.
  6. Our very good frinds, in teh form of Lincoln Stein and otehrs have been so gracious and generous as to bless us with CGI.pm and its related modules. Please do not make the mistake of trying to do it yourself.

jdtoronto


In reply to Re: HTML::Template, CGI, pass template params to next script by jdtoronto
in thread HTML::Template, CGI, pass template params to next script by Lori713

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.