controller
class Category extends Admin_Controller {
public function __construct() {
parent::__construct();
$this->load->model('category_model');
}
public function index(){
$data['select'] = $this->category_model->getinfo();
$this->load->view('category_view', $data);
}
}
?>
model
function getinfo(){
$query = $this->db->get('user');
return $query;
}
view
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<table border="1">
<tbody>
<tr>
<td>Id</td>
<td>Name</td>
<td>lastname</td>
</tr>
<?php
foreach ($select->result() as $row)
{
?><tr>
<td><?php echo $row->id;?></td>
<td><?php echo $row->name;?></td>
<td><?php echo $row->lastname;?></td>
</tr>
<?php }
?>
</tbody>
</table>
<body>
</body>
</html>
i need to place multiple checkboxes so i can delete data via clicking it i also must have to check multiple checkbox at once(single check and check All both).