带有复选框的DataTables表单

时间:2016-06-30 07:54:48

标签: php mysql datatable

我尝试使用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>

0 个答案:

没有答案