That won't work. The redirect header is just that - a redirect with no content.
Assuming that the PayPal form accepts QS info, you could get it to work like this:
# 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);
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.
.02
cLive ;-)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.