IM構建多頁的形式,我想每個部分驗證並提交給數據庫用戶點擊「下一步」後,這是做它最好的辦法.. 。我已經在一個頁的書面整個窗體,並希望在數據庫保存用戶點擊「下一步」,但此下一個按鈕我沒有writtrn類型=「提交」,因此如何將數據傳遞給控制器
這個觀點後,它顯示在多步的形式任何一個可以提供有關如何在數據庫保存的想法多頁的形式和每個步驟驗證後保存在數據庫中的數據
<div class="container">
<div class="stepwizard">
<div class="stepwizard-row setup-panel" >
<div class="stepwizard-step">
<a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a>
<p>Step 1</p>
</div>
<div class="stepwizard-step">
<a href="#step-2" type="button" class="btn btn-default btn-circle" disabled="disabled">2</a>
<p>Step 2</p>
</div>
<div class="stepwizard-step">
<a href="#step-3" type="button" class="btn btn-default btn-circle" disabled="disabled">3</a>
<p>Step 3</p>
</div>
</div>
</div>
<form role="form">
<div class="row setup-content" id="step-1">
<div class="col-xs-12">
<div class="col-md-12">
<div class="video-container">
<iframe width="300" height="168" src="" frameborder="0" allowfullscreen></iframe>
</div>
<button class="btn btn-primary nextBtn btn-lg pull-right" type="button" >Next</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-2">
<div class="col-xs-12">
<div class="col-md-12">
<h3> Step 2</h3>
<div class="form-group">
<table class="table table-striped b-t b-light text-sm">
<tr>
<td> <a href="<?php echo site_url("user/register") ?>" > New User ?? </a> </td>
</tr>
<tr>
<th> Email </th>
<td><input type="text" name="email" /> </br> </br></td>
</tr>
<tr>
<th> Password </th>
<td> <input type="password" name="password" /> </td>
</tr>
<tr>
<th></th>
<td> <input type="submit" name="login" value="Sign in" /> </td>
<td></td>
</tr>
</table>
</div>
<button class="btn btn-primary nextBtn btn-lg pull-right" type="button" >Next</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-3">
<div class="col-xs-12">
<div class="col-md-12">
<h3> Step 3</h3>
<button class="btn btn-success btn-lg pull-right" type="button">Finish!</button>
</div>
</div>
</div>
</form>
</div>
您需要使用'AJAX' – Rupam
@Rupam是即時通訊使用AJAX,但這個數據不傳遞給控制器 – webpic