Jump to content

PHP and Paypal


ebolt007

Recommended Posts

I'm trying to make a form that has to carry the name address and all that to Paypal as well as some checkboxes that need to add themselves up if multiples are checked. But the Paypal form submit automatically goes to Paypal so the post doesn't post on my page to get the value if that makes any sence? Has anyone done anything like this? I'm trying to basically do.

 

<FORM action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
                  <input type="hidden" name="cmd" value="_xclick">
                  <input type="hidden" name="business" value="myemail@email.com">
                  <input type="hidden" name="currency_code" value="USD">
                  <input type="hidden" name="return" value="http://backtomysite.com">


              <table style="float:left; margin-bottom:10px;" width="700px">
              <tr>
              <td>Name</td><td colspan="5"><input type="text" name="name" value="" size="40" /></td>
              </tr>
              <tr>
              <td>Address</td><td colspan="5"><input type="text" name="address1" value="" size="40" /></td>
              </tr>
              <tr>
              <td>City</td><td><input type="text" name="city" value="" size="20" /></td><td>State</td><td><input type="text" name="state" value="" size="4" /></td><td>Zip</td><td><input type="text" name="zip" value="" size="6" /></td>
              </tr>
              <tr>
              <td>Phone</td><td><input type="text" name="phone" value="" size="20" /></td>
              </tr>
               <tr>
              <td colspan="6">Professional: <input type="radio" name="item_name" value="Professional Package">     Non-Professional: <input type="radio" name="item_name" value="Non-Professional Package"></td>
              </tr>
              
              <tr>
              <td colspan="6"><b>REGISTRATION FEE:</b></td>
              </tr>
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="150"> Professional – $150.00</td>
              </tr> 
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="95"> Student – $95.00</td>
              </tr> 
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="55"> Non-Professional: Single – $55.00 (family/survivors)</td>
              </tr> 
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="50"> *Optional Workshops - $50 for conference participant</td>
              </tr> 
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="85"> $85 for non-conference participant</td>
              </tr>
               <tr>
               <input type="hidden" name="on1" value="Comments">
              <td>Additional Comments:</td><td colspan="5"><textarea rows="2" cols="50" value="" name="os1"></textarea></td>
              </tr>
              <tr>
              <td colspan="6"><input type="checkbox" name="amount" value="250"> Vendors: Vendor booth is available for $250.</td>
              </tr> -->
              <tr>
              <?echo "<input type=\"hidden\" name=\"amount\" value=\"$amount\">\n";?>
              <td colspan="6"><input name="Submit" type="submit" value="Submit Registration" /></td>
              </tr>
              </table>
              </form>

 

How do I get the amount checkboxes to total into the amount? I have the Comments working and the Proffesional Radio buttons working to create the product, but I'm not sure if the Name and Address stuff is settup right either. I keep reading and reading, but there isn't much info on paypal, especially doing checkbox arrays. And doing an if (isset($_POST['amount']))

{

code to add up the array

}

Doesn't help either. Any help would be great. Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.