0
所以簡單地試圖做一個HTML表單提交,但我的佈局使用了很多的div和類,似乎並沒有得到他們的名稱/ ID,我認爲它不工作,因爲形式內的一切div的等,但當然,這是佈局的早上因此可能失去了一些東西遲到/錯過了一些東西出來html輸入表格不會提交?
<?php
if (isset($_POST["submit"]) && !empty($_POST["submit"])) {
echo "testing";
}
?>
<h3 class="widget-title text-dark">
Cart summary
</h3>
<div class="clearfix"></div>
</div>
<div class="widget-body">
<div class="row">
<form action="checkout.php" method="POST">
<div class="col-sm-6 margin-b-30">
<div class="row">
<div class="col-sm-6">
<label>First Name*</label>
<input type="text" class="form-control" id="fname" name="fname" placeholder="John"> </div>
<!--/form-group-->
<div class="col-sm-6">
<div class="form-group">
<label>Last Name*</label>
<input type="text" class="form-control" id="lname" name="lname" placeholder="Doe"> </div>
<!--/form-group-->
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label>Full Address*</label>
<input type="text" class="form-control" id="Address" placeholder="124, Lorem Street.."> </div>
<!--/form-group-->
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Post code*</label>
<input type="text" class="form-control" id="Post code" placeholder="G52 2LW"> </div>
<!--/form-group-->
</div>
<div class="col-sm-6">
<div class="form-group">
<label>phone*</label>
<input type="text" class="form-control" id="phone" placeholder="123-345-3322"> </div>
<!--/form-group-->
</div>
<div class="payment-option">
<ul class=" list-unstyled">
<li>
<label class="custom-control custom-radio m-b-20">
<input id="radioStacked1" name="radio-stacked" type="radio" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">Payment on delivery</span>
<br> <span>Please send your cheque to Store Name, Store Street, Store Town, Store State/County, Store Postcode.</span> </label>
</li>
<li>
<label class="custom-control custom-radio m-b-10">
<input name="radio-stacked" name="submit2" type="radio" class="custom-control-input"> <span class="custom-control-indicator"></span> <span class="custom-control-description">Paypal <img src="images/paypal.jpg" alt="" width="90"></span> </label>
</li>
</ul>
<p class="text-xs-center"> <a href="?id=<?php echo $id1 ; ?>" id="submit" name="submit" class="btn btn-outline-success btn-block">Pay now</a> </p>
</div>
</div>
</form>
非常感謝你提前
哪裏做div的關閉... –
香港專業教育學院做了一個編輯的所有div接近表單內側 – shadow
http://prntscr.com/ g7gc12 – shadow