Sorry I don't understand. As long as I can see your script runs fine. To allow users generating multiple orders you should change the user interface, not the script behind

If this is what you want, I think that a couple of button "Add to your order" and "process order" in the response page could do the trick.

The first button could resend the first page with a hidden field containing a serialized version of the order so far (this is a shortcut, better way would be mantaining a session server-side with the content of the user "cart").

The second button would confirm the order as entered (sum of all the single entry)

PS. Remember to be careful using serialized data in a HTML page. The most obvious way of serialize through Data::Dumper and deserialize with eval open the road to code injection when used on the internet! You should always be aware that anybody can put anything in your hidden fields, and avoid the possibility of exploitation


In reply to Re: CGI script help by psini
in thread CGI script help by negzero7

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.