Qotada Qotada - 5 months ago 16x
PHP Question

Codeigniter missing argument

Help guys.
This my error problem error

I Think i follow right tutorial, but i dont know what the wrong from my code

there is my controlers

public function edit($id){
$where = array('id' => $id);
$data['barang'] = $this->model_barang->edit($where,'barang')->results();
public function update(){
$id = $this->input->post('id');
$jenis = $this->input->post('jenis');
$nama = $this->input->post('nama');
$harga = $this->input->post('harga');
$pemasok = $this->input->post('pemasok');

$data = array (
'jenis' => $jenis,
'nama'=> $nama,
'harga' => $harga,
'pemasok' => $pemasok

$where = array(
'id' => $id


and there is my model, i think my model is not showing any error

public function edit($where,$table) {
return $this->db->get($table,$where);
public function update($where,$data,$table){


You need to pass the $id to the controller. It should be something like this http://domain.com/barang/edit/1