senőr_biggles has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks, I'm writing a CGI program that uses the "Location:" header to redirect the user to another page. Currently I am appending a "?a=b&y=z" to the URL to pass data to the next script, but I'd like to keep all of that out of the URL like a form with method="POST". What's my best option here?

Replies are listed 'Best First'.
Re: Instigating a POST
by arkturuz (Curate) on Jul 12, 2007 at 08:45 UTC
    Use some session mechanism, send cookies to the user, and store the data on the server per session in a database. When the user comes from redirected page you have the session cookie and you can easily get the necessary variables and other data needed (of course, all pages in 'Location' must be under the same domain for getting cookies properly).

    Update: CGI::Session might be good place to start.

Re: Instigating a POST
by Anonymous Monk on Jul 13, 2007 at 04:13 UTC