我尝试使用MySql中的数据在CodeIgniter中创建DataTable。我不确定如何在DataTable上创建将处理每行复选框的表单。
HTML
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Price</th>
<th>Discount</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Name</th>
<th>Price</th>
<th>Discount</th>
</tr>
</tfoot>
<tbody>
<?php foreach($data as $d): ?>
<tr>
<td></td>
<td><?=$d->name?></td>
<td><?=$d->price?></td>
<td><?=$d->discount?>%</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>