A couple of points:

Session ID's should be dynamically generated as rob_au suggests and stored in a session table for better security. If your database is compromised, someone can spoof all your users. It just adds another layer of security to your app. Generate another cookie each time they log in. Make sure you provide an option for the user to logout also.

It sounds like you could use a 'staging' area for your data. (if the entries are not required immediately). How about this:

  1. Create a table called stage with a username and data column.
  2. Each time the enter button is pressed go get what is already has already been stored.
  3. You store your incomplete list in the database by using Storable.pm as an array
  4. check to see if the no more data checkbox has been checked
  5. If the check box is selected thaw everything out then chuck it in the database as you need. If not thaw it all out, and  push @existing_data, @new_data, freeze it, and put it back.

If you use this method, you are not time dependant at all (what happens if they want to continue the list after your "Time Out" period? (go to lunch, come back after the weekend et al))

If the inputted data is required straight away, then you could do a similar thing, except add a "complete" column to your items table.

To provide a summary, you scan all the rows belonging to your user with the flag set saying the list is not complete. On displaying the summary, you set all the flags to "The list is complete".

Obviously this is a little simplistic, if you flesh it out a bit, it should work pretty well.

HTH


In reply to Re: Re: A CGI chained-event theory question by Ryszard
in thread A CGI chained-event theory question by JPaul

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.