Sorry, I can't provide you with a valid answer to your direct question, but let me at least suggest a few things related to this:

Also, does anyone know of a way I can save state while a person is outside of a CGI page?

I have looked at the CGI::Persistent before and think that it may be worth your consideration. Simply put, it allows you to store client state on your server (inside data files). You simply have to tie this 'state data' to a session id of your user. The way I did it was assign a unique session id to new clients (say, right after they are successfully signed in) and save that id in a cookie on their side. On the server side, you create a new CGI::Persistent object to store this client's state. Whenever a user returns to your page, you simply look up his/her session id cookie value and use it to refer to earlier saved state data(using the same CGI::Persistent object).

Note: where is your $redirect variable set in the code? You call your checkCookies() in void context althought the sub returns a value. Shouldn't you save it in your $redirect variable?

"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith

In reply to Re: Redirection problems with Perl, Netscape and IE by vladb
in thread Redirection problems with Perl, Netscape and IE by newrisedesigns

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.