php - Fatal error: Call to undefined method Model_...::function() on controller -Codeigniter -
i got message fatal error: call undefined method model_...::function() happened on 1 function
so here's code
controller :
function paidgen(){ $reportcode=$this->input->get('paid'); $data = array( 'status' => 'proccess' ); $getcode= $this->model_expreport->changestat($data,$reportcode); $data['getcode2'] = $getcode; $this->loadpage($data); } function loadpage($data){ parent::header(); $this->load->view('reportlands',$data); parent::footer(); }
view :
<input name="paid[]" value="<?php echo $o->reportcode ?>" type="checkbox" class="checkpaid" /> <span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span> <form method="get" action="<?php echo site_url()? >cexpreport/paidgen" class="pull-right"> <input name="paid[]" value="<?php echo $o->reportcode ?>" type="checkbox" class="checkpaid" /></form>
i separate input checkbox form javascript think that's not problem, because code work well
model :
function changestat($data,$reportcode){ $this->db->where('reportcode', $reportcode); $this->db->update('expreport', $data); }
hope can give me suggestions ,thank much
Comments
Post a Comment