If you want to POST the data, you will need to generate a form to do it, and with the help of some javascript *ducks* you can make it autosubmit.
sub paypal_redirect {
my ($query, $total_cost) = @_;
my $cgi = CGI->new;
print $cgi->header; # normal header
print $cgi->start_form(-method => 'post',
-action=>'https://www.paypal.com/cgi-bin
+/webscr');
print $cgi->hidden(-name => '_cmd', -value => '_xclick');
print $cgi->hidden(-name => 'business', -value => $email);
print $cgi->hidden(-name => 'item_name', -value => $comment);
print $cgi->hidden(-name => 'item_number', -value => $query->pa
+ram('session'));
print $cgi->hidden(-name => 'amount', -value => $total_cost);
print $cgi->hidden(-name => 'no_note', -value => 1);
print $cgi->hidden(-name => 'currency_code', -value => 'USD');
print $cgi->submit('Continue to PayPal'); # you will need that
+button in case
# the user has JS off
+.
print $cgi->end_form;
print <<JS;
<script language="JavaScript">
<!--
document.forms[0].submit();
//-->
</script>
JS
}
He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
Chady | http://chady.net/