Hi my username section edit will not update some thing is wrong saying argument I know it is $user_id but need to be able to make it so my users can update there details.
public function user_edit($user_id) {
if ($this->input->post(‘btn-save’)) {
$this->admin_model->user_edit();
if ($this->admin_model->error_count != 0) {
$this->data[‘error’] = $this->admin_model->error;
} else {
$this->session->set_userdata(‘tmp_success’, 1);
redirect(‘admin/user_view’);
}
}
$this->db->order_by(‘role’, ‘ASC’);
$this->data[‘roles’] = $this->db->get(‘cws_roles’)->result();
$this->data[‘users’] = $this->db->get_where(‘cws_users’, $user_id)->row();
$this->data[‘title’] = ‘Admin Users’;
$this->load->view(‘header’, $this->data);
$this->load->view(‘admin/user_edit’);
$this->load->view(‘footer’);
}