So I have a retreat registration form that is hooked up to PayPal. Now, before I hooked it up to PayPal, I setup code in PHP to go through and check if each field was valid and sanitize them properly. After that, it would add this person to a database.
Now, what I wanted to happen after that is for it to redirect the user to the PayPal paying page, sending along all the POST information as well. Problem is I have no clue how to do that.
So far, my boundary is the form's action. If I want all the fields to be validated/sanitized and have the user put into my database, I set the form's action to the local register.php
. If I want my user to actually be sent to PayPal where his information gets carried along aswell via POST then I set the form's action to https://www.sandbox.paypal.com/cgi-bin/webscr
(Still in the PayPal sandbox.)
Is there a way that I can have the form's action set to register.php
and then send the POST information to https://www.sandbox.paypal.com/cgi-bin/webscr
?