in reply to Saving parameters before sending to 3rd party

Here's what you want, assuming that the 3rd party is allowing the data to be sent as a GET request:

#!c:/perl/bin/perl -w $|++; use strict; use CGI::Simple; use URI::Escape; my $CGI = CGI::Simple->new(); # save your copy of the information here # using whatever method you prefer # now we redirect the user to the 3rd party with the data my $query = join( ';', map { uri_escape($_) . '=' . uri_escape($CGI->param($_)) } $CGI->param() ); print $CGI->redirect( 'http://their.server.com/foo/bar.pl?' . $query );

Replies are listed 'Best First'.
Re^2: Saving parameters before sending to 3rd party
by Anonymous Monk on Mar 02, 2004 at 23:16 UTC

    In spirit of permitting multiple values to the same parameter name, change the query builder I provided to this new one:

    my $query = join(';', map { my $k = shift @$_; join(';', map { uri_escape($k) . '=' . uri_escape($_) } @$_) } map { [$_, $CGI->param($_)] } $CGI->param() );
      You could also do:

      my $query = join(';', map { my $k = $_; join(';', map { uri_escape($k) . '=' . uri_escape($_) } $CGI->param($_)) } $CGI->param() );