/    Sign up×
Community /Pin to ProfileBookmark

possibly html form question

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=”https://www.sandbox.paypal.com/cgi-bin/webscr” target=_blank).

  • 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=”https://www.sandbox.paypal.com/cgi-bin/webscr“>
    <input type=”hidden” name=”recipient” value=”[email protected]“>
    <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=”_
    xclick”>
    <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

    to post a comment
    HTML

    0Be the first to comment 😎

    ×

    Success!

    Help @Aceman spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.20,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...