Webmaster Forum

Go Back   Webmaster Forum > Web Development > Web Design Lobby

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.

LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 01-23-2008, 07:30 PM
Junior Member
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
Multi-Function Form Submit Button

I've been working on a form for a registration page that will accept PayPal, and I've a couple of questions...all of which will probably have obvious answers that I'm missing...

1) I need the submit to do one of two things. If the user selects the "Pay Now" option from a drop-down selection, it needs to act like the standard PayPal button (sending them to the PayPal website so they can make their payment). If they select the "Pay Later" option, it needs to NOT take them to PayPal and instead take them directly to the "Thank You" page.

2) I need the contents of the completed form to be sent to an e-mail address. This one I am pretty sure I can figure out, I'm just irritated with the Submit button right now.

Here's the code I'm working with:
<form id="form1" name="form1" method="post" action="">
<p><span id="lastname">
<label>Last Name
<input type="text" name="lastname" id="lastname" />
<p><span id="firstname">
<label>First Name
<input type="text" name="firstname" id="firstname" />
<p><span id="address">
<label>Street Address
<input type="text" name="address" id="address" />
<p><span id="city">
<input type="text" name="city" id="city" />
<p><span id="state">
<input type="text" name="state" id="state" />
<p><span id="zip">
<label>Zip Code
<input type="text" name="zip" id="zip" />
<p><span id="phone">
<label>Phone Number
<input type="text" name="phone" id="phone" />
<label>E-Mail Address
<input name="email" type="text" id="email" />
<label>Web Site
<input type="text" name="website" id="website" />
<p><span id="team">
<label>Prefered Team
<select name="team" id="team">
<option selected="selected">USA Special Forces</option>
<option>Columbian Government</option>
<option>Columbian Drug Cartel</option>
<option>I just want to shoot someone!</option>
<p><span id="payment">
<label>Payment Options
<select name="payment" id="payment">
<option selected="selected">Pay now via Paypal - $25.00</option>
<option>Pay at the field - $35.00</option>
<label>Comments, Special Equipment, or Special Needs<br />
<br />
<textarea name="comments" id="comments" cols="70" rows="5"></textarea>
<p><input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
<input type="hidden" name="business" value="oldawg860@yahoo.com" />
<input type="hidden" name="item_name" value="Clear and Present Danger PrePay" />
<input type="hidden" name="amount" value="25.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="shipping" value="0.00" />
<input type="hidden" name="shipping2" value="0.00" />
<input type="hidden" name="handling" value="0.00" />
<input type="hidden" name="return" value="http://www.wolfcreekpaintball.com/pages/thankyou.htm" />
<input type="hidden" name="cancel_return" value="http://www.wolfcreekpaintball.com/pages/CaPDReg.htm" />
<input type="hidden" name="undefined_quantity" value="0" />
<input type="hidden" name="receiver_email" value="oldawg860@yahoo.com" />
<input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
<input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="no_note" value="0" />
<input type="image" name="submit" src="http://www.wolfcreekpaintball.com/images/button_submit.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!" />
Reply With Quote



  #2 (permalink)  
Old 01-24-2008, 01:12 AM
Boogle's Avatar
Contributing Member
Latest Blog:

Join Date: 09-03-07
Location: England
Posts: 649
iTrader: 0 / 0%
You need a script or some code-behind? What technology are you using to create the site? ASP/PHP etc? If neither and it's just a plain HTML site then you would to use javascript or AJAX or just use two separate buttons. if you're using ASP let me know and i'll post the code for you,

Price is what you pay... Value is what you get.
Reply With Quote
  #3 (permalink)  
Old 01-24-2008, 04:31 AM
Junior Member
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
sorry...I knew I was forgetting something

i'm using js...too little sleep...i forgot that there needs to be some code to tell the form what to do
Reply With Quote
  #4 (permalink)  
Old 01-28-2008, 06:50 PM
digiweb's Avatar
Contributing Member
Join Date: 04-07-06
Location: Manchester, NH
Posts: 722
iTrader: 1 / 100%
PHP Code:
if ($_POST['payment'] == 'Pay now via Paypal - $25.00') {
header("Location: paypalbuttonpage.php");
} else {
header("Location: thankyoupage.php");
Reply With Quote
  #5 (permalink)  
Old 01-29-2008, 05:11 AM
Junior Member
Join Date: 01-23-08
Posts: 3
iTrader: 0 / 0%
thanks digi...I'll try that
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form button half working gridsix Web Design Lobby 2 03-08-2008 09:06 PM
Do you use the vBulletin "multi-quote" function? Avinash Forum Lobby 2 11-11-2006 06:39 AM
Need Help: Form submit and IE Back button problem !!! cuongdm Coding Forum 4 10-27-2006 11:53 AM
Make a button or image enter something into a form? Leader of Men Coding Forum 2 11-13-2003 06:25 PM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 08:42 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media

Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.