Onclick the status will be changed to Done
& again On click it will be changed to Not Done
.
I'm unable to complete the Controller
and Model
.
View.php :
<td>
<?php if ($row->task_status == 'todo') {echo "Not Done";} ?>
<?php if ($row->task_status == 'done') {echo "Done";} ?>
</td>
DB :
`task_status` enum('notdone','done') NOT NULL
model.php :
public function change_status($id, $status)
{
$this->db->where('id', $id);
$this->db->update('table_name')
}
controller:
public function change_status()
{
$status = array( 'task_status' =>);
$this->model_users->change_status_model($status, $this->input->post('id'));
redirect('main/members');
}