in reply to Redirecting form data to external site

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 ;-)

Replies are listed 'Best First'.
Re: Re: Redirecting form data to external site
by fuzzyping (Chaplain) on Nov 21, 2003 at 06:42 UTC
    OMG, I can't believe how stupid I am that I didn't think to just append the URI parameters. LOL! Thanks Clive, I'm sure that should work.

    Update: Actually, it's still experiencing the same 302 errors. I forgot to emphasize that this is a post method, so I'm not sure this will work after all.

    -fp