If a form which is submitted using 'POST' gets redirected by the server (ie. if the server replies with the Location header), does the information in the post get resubmitted by the browser too.
Basically, I want to be able to verify and keep a copy of the data that my client is submitting, before forwarding them to a third party website (in this case, I'm making a checkout and redirecting to paypal). Will that work, or do I need to go about it in another way?
Im not totally sure what you mean but when you make a form and its method is post that information in the form will be lost if you have a redirect in the page that the form points to. Sessions could keep the data for you if you want or even $_GET possibly.
What you are exactly after is not possible in that sense.
It is possible to transmit POST data to another PHP script. However, it is not possible (to my knowledge) to send that data WITH a redirect.
In other words, you can send any/all post data to another script. So that part is true. You can send the user to another script. That part is true. However, you cannot send the user to another script with that data.
If it is adequate for your purposes, you may send the data to the new script, then send the user there. That much is simple enough.
If that would be good enough, reply here and I will show you how to go about doing it.
Thanks for the feedback!
Actually, with PayPal, it was the start of the transaction I wanted to streamline, rather than the end. Basically, I'm using a custom cart, so I need to collect a lot of information before I can send the user to PayPal. So the user has to enter his details and then confirm his order on my site. Then, he'll need to click on the 'Proceed to Payment' button and go through PayPal's half-a-dozen screens to pay. I was worried this would be too much clicking from page to page for even simple transactions - which can get annoying. I was hoping I'd be able to make the 'Confirm' and 'Proceed to Payment' the same button (by redirecting the POST to PayPal). Not a huge issue, really. Just had me thinking.