I am not sure how to make this sound really easy, but I will try.
I have a course list on a php web page that you can click a button to register for. The page pulls information from an XML file. The problem I am having is this:
1. I click on the button to register (I need this to open a php register form page target=”_blank”. (good so far and it works)2. ONCE you fill in the form and click submit, I need this to open paypal to accept payment (action=”3. If paypal completes and is accepted then I would like the registerForm.php to submit the information from before BUT NOT before paypal is complete. If paypal is cancelled at any point then I want my registerForm.php to close and only the main webpage should be open (as if to start the whole process over again).
My problem is how to get this to work.
–mainpage (not sure if i should make this form a popup?)
<form action=”registerForm.php” target=”_blank” method=”post”>
<input type=”hidden” name=”item_name” value=” <?php echo $course_data[$a][“name”]; ?>” >
<input name=”submit” type=”image” src=”./pictures/register_now.png” alt=”Make payments with PayPal – it’s fast, free and secure!” border=”0″>
<form>
–registerForm (here take all user data and plug into paypal BUT DO NOT SUBMIT UNTIL PAYPAL COMPLETED)
<form name=”RegisterForm” id=”RegisterForm” method=”post” enctype=”multipart/form-data” action=”
<input type=”hidden” name=”recipient” value=”
<input type=”hidden” name=”subject” value=”Web FormMail”>
<input type=”hidden” name=”gmt_offset” value=”-5″>
<input type=”hidden” name=”cmd” value=”_ext-enter”>
<input type=”hidden” name=”redirect_cmd” value=”
<input type=”hidden” name=”first_name” value=” <?php echo $HTTP_POST_VARS[“first_name”]; ?>” >
<input type=”hidden” name=”last_name” value=” <?php echo $HTTP_POST_VARS[“last_name”]; ?>” >
<input type=”hidden” name=”address1″ value=” <?php echo $HTTP_POST_VARS[“address1″]; ?>” >
<input type=”hidden” name=”address2″ value=” <?php echo $HTTP_POST_VARS[“address2″]; ?>” >
<input type=”hidden” name=”city” value=” <?php echo $HTTP_POST_VARS[“city”]; ?>” >
<input type=”hidden” name=”zip” value=” <?php echo $HTTP_POST_VARS[“zip”]; ?>” >
So far the pattern works, but how do i get the registerForm.php to NOT submit but open paypal and once paypal is completed
(i.e. <input type=”hidden” name=”return” value=””>
<input type=”hidden” name=”cancel_return” value=””> )
have it close the paypal page, focus on the registerForm.php, and NOW submit that. If paypal is cancelled, then close both the paypal popup and the registerForm.php popup?
Thanks for your help in advance!
And I know that I did not give you ALL the inputs but rather just the main ideas.
Anthony