Header - Post Question...

From: Date: Mon, 12 May 2003 03:17:18 +0000
Subject: Header - Post Question...
Groups: php.general 
Request: Send a blank email to php-general+get-147251@lists.php.net to get a copy of this message
Good Day, I apoligize first of all, for I really don't know how to ask this question: But here goes: I am trying to connect a form to PayPal through the header command. PayPal requires certain variables and I have those and am not having a problem with that. However, PayPal requires the information sent to their website to be be sent via 'Post' from a form. This is where I am running into a snag. My form page that I'm using to gather information from the user is doing a lot of things. It doesn't post automatically to the PayPal site, but first posts to itself and then checks through all the variables to see if the user has entered in everything and if the user has selected a uniqure user_name, etc... If the user has done everything correctly, then the PHP page uses the following code to actually go to the PayPal site: header(sprintf("Location: %s", $insertGoTo)); The header command works nicely. However, it doesn't post any of my variables that I set dynamically through PHP. I like using the header command because it allows me to do error checking prior going to the URL, but it is not sending the variables. I have tried embedding the variables in the URL like paypal.com?id=me&amount=5, etc... and PayPal doesn't recognize variables in the URL. It looks like it only recognize it through doing a post. Now, I could create another PHP page that would be a mediator page that would have my form for just opening the PayPal with button and a bunch of hidden fields, but I prefer to have everything on one page if possible. Is there a way to use post with the header command, so that my variables get posted? Am I missing something? Thanks and I hope this makes sense! Blessings, Doug Coning

« previous php.general (#147251) next »