in reply to Redirecting form data to external site
Assuming that the PayPal form accepts QS info, you could get it to work like this:
Or something like that. I've broken down the steps above to make it easier to read, but you could also combine the qs creation into one statement using join and map if you wish.# build attr hash - expand below... my %attr = ( _cmd => '_xclick', business => $email, item_name => $comment); # create query string name/value pairs my @qsvars=(); for (keys %attr) { # escape values $attr{$_} = $cgi->escape( $attr{$_} ) ; # add to qs vars push @qsvars, "$_=$attr{$_}"; } # create query string my $qs = join '&', @qsvars; # send redirect print $cgi->redirect("https://www.paypal.com/cgi-bin/webscr?$qs"); exit(0);
.02
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Redirecting form data to external site
by fuzzyping (Chaplain) on Nov 21, 2003 at 06:42 UTC |