To expand on the more secure session key format, you can tuck away the location of the form that was last accessed (generated) in your app and then when a post happens and the session ID is valid you know where the last display of information came from. If you have a more complicated site that has complex structure you can add to a "queue" like array that keeps the last lets say 10 generated page locations in the session and the form portion of the app can loop through the array and see if an acceptable page to generate the form is in the list.

Another option is a flag, in this scenario you have a pair of generated form page and POST processors, when the session is accessed in such a way where the form generating section of code is called, a flag is set in the session. Then when the form is posted back to the app you can check to make sure the flag has been set and clear it to force the same path in the future. If the flag is not set you can error out and force the correct path to happen. This should help reduce the problem of tabbed viewing with the same session.


-Waswas

In reply to Re: Re: Obtaining requesting form's URL? by waswas-fng
in thread Obtaining requesting form's URL? by ashisht

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.