[eluser]Unknown[/eluser]
I already copy both of your code and
this is the error
Model
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Loader::$input
Filename: models/test_model.php
Line Number: 10
Fatal error: Call to a member function post() on a non-object in /home/pgmr4/public_html/testInsert/application/models/test_model.php on line 10
and I
try to solve it by change the code like this
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Test_model extends CI_Model{
public function insert(){
$this->load->helper('url');
$data = array('id' => $this->input->post('id'),
'deskripsi' => $this->input->post('deskripsi')
);
return $this->db->insert('table_name', $data);
}
}
?>
and still no data in my database
regards