Membetulkan tombol edit

gan saya mau nanya kalo eror kayak giti salahnhya dimana ya.

Type: ArgumentCountError

Message: Too few arguments to function Inbox2::update(), 0 passed in C:\xampp\htdocs\mailadministration\system\core\CodeIgniter.php on line 532 and exactly 1 expected

Filename: C:\xampp\htdocs\mailadministration\application\controllers\Inbox2.php

Line Number: 26

Backtrace:

File: C:\xampp\htdocs\mailadministration\index.php Line: 315 Function: require_once

Ini di viewnya=

Pengirim

Penerima

Subject

Pesan

'btn btn-success float-right')) ?>

Ini di modelnya= function edit_data($where,$table){ return $this->db->get_where($table,$where); }

function update_data($where,$data,$table){ $this->db->where($where); $this->db->update($table,$data); }

dan ini di controlernya= function update($doc_id){ $doc_id = $this->input->post('doc_id'); $from_ = $this->input->post('from_'); $to_ = $this->input->post('to_'); $subject = $this->input->post('subject'); $doc_type = $this->input->post('doc_type'); $message = $this->input->post('message');

$data = array( 'from_' => $from_, 'to_' => $to_, 'subject' => $subject, 'doc_type' => $doc_type, 'message' => $message, ); $where = array( 'doc_id' => $doc_id ); $this->Inbox_model->update_data($where,$data,'tb_doc'); redirect('inbox2/index'); }

function edit($doc_id){ $this->load->model('Inbox_model'); $where = array('doc_id' => $doc_id); $data['row'] =$this->Inbox_model->edit_data($where,'tb_doc')->row(); $this->load->view('admin/edit_data2',$data); }

Terima kasih

avatar Mtaufiq2002
@Mtaufiq2002

2 Kontribusi 0 Poin

Dipost 4 tahun yang lalu

Tanggapan

Rapihin gan kodenya, susah bacanya. Kan udah di sediakan fitur buat bungkus kode di sini

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban