If you don't want to display the form, but direct the user to another script entirely, then you should output a 302 HTTP status code and a suitable Location header thus having them bypass (from their point of view) the page entirely. The drawback to this approach is that it adds a little to the complexity of getting any unchanging form data (that you would normally put in a hidden input) to the next script in the sequence.

If you have only a little data, you could encode it as a query string on the URI. This has the drawback of being bookmarkable and easily refreshable - which could have drawbacks if the submission changes anything on the server. (I'm assuming it will since you are using the post method in the first place).

If you have more data, or for a bit more safety, you could store the data somewhere on the server (a database or flat file) with a unique identifier, then include that identifier in the query string. (And have sensible clean up routines).


In reply to Re: form method in a null form by dorward
in thread form method in a null form by Anonymous Monk

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.