【发布时间】:2014-08-22 08:51:47
【问题描述】:
我有一个表格,用于收集个人汽车的数据(年份、颜色、等级、vin 的最后 4 位数字。同样的表格还包含有关注册此活动的人的信息。
当用户单击 paypal 立即购买按钮时,它应该向接受表单的人发送一封电子邮件,并将用户重定向到 paypal,以便用户支付注册费。
您将看到一个提交按钮和一个立即购买按钮。我基本上想要提交的功能,但像现在购买按钮一样重定向到贝宝。也不确定表单上的操作应该是什么。
<div id="container">
<section id="register">
<form action="mail.php" method="post" accept-charset="utf-8" on>
<h4>Your Jeep</h4>
<div class="form-field">
<fieldset>
<label>Year</label>
<input value="" placeholder="Year" type="text" name="year">
</fieldset>
<fieldset>
<label>Color</label>
<input value="" placeholder="Color" type="text" name="color">
</fieldset>
<fieldset>
<label>Class</label>
<input value="" placeholder="Stock, Modified, Highly Modified" type="text" name="class">
</fieldset>
<!--------------------
<div class="form-field">
<fieldset>
<label>Class</label>
<select class="form-field">
<option value="Select Class">Select Class</option>
<option value="Stock">Stock</option>
<option value="Modified">Modified</option>
<option value="Highly Modified">Highly Modified</option>
</select>
</fieldset>
</div>
------------------------->
<fieldset>
<label>Last 4 digits of VIN</label>
<input value="" placeholder="Last 4 digits of VIN" type="text" name="vin">
</fieldset>
</div>
<h4>You</h4>
<div class="form-field">
<fieldset>
<label>Name</label>
<input value="" placeholder="Name" type="text" name="name">
</fieldset>
</div>
<div class="form-field">
<fieldset>
<label>Address</label>
<input value="" placeholder="Address" type="text" name="address">
</fieldset>
</div>
<div class="form-field">
<fieldset>
<label>City</label>
<input value="" placeholder="City" type="text" name="city">
</fieldset>
</div>
<div class="form-field">
<fieldset>
<label>State</label>
<input value="" placeholder="State" type="text" name="state">
</fieldset>
</div>
<div class="form-field">
<fieldset>
<label>Zip</label>
<input value="" placeholder="Zip" type="text" name="Zip">
</fieldset>
</div>
<div class="form-field">
<fieldset>
<label>Email</label>
<input value="" placeholder="Email" type="text" name="email">
</fieldset>
</div>
<div class="form-button">
<input type="submit" onclick="this.form.submit();"></div>
</form>
<div id="paykim">
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Jeep Registration">
<input type="hidden" name="amount" value="10.00">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<p>Clicking the Submit button will bring you to the official PayPal website where you will be able to send the $10 Registration Fee to </p>
<p id="ekim">Email of person accepting the registrations.</p>
<p id="confirm">You'll recieve a conformation email once your transaction is complete.</p>
</div>
</section>
</div>
【问题讨论】: