below is my books_controller.php
function books_s()
{
$this->load->helper('form');
$this->load->helper('html');
$this->load->model('books_model');
$sri=$this->input->post();
print_R($sri);
if($this->input->post())
{
$bookme=$this->load->books_model->post_books();
}
$this->load->view('header.php');
}
i have not placed my books_view.php code bcos you can see in my controller code i have done print_R($sri); i can see the the values are posted from view page to controller page ...out put is
Array (
[Id] => 4
[title] => just testng
[text] => goooo
[submit] => submit
)
` iam also getting error message
Message: Undefined property: CI_Loader::$books_model
Filename: controllers/books_Controller.php
books_controller.php i know its an issue with my model code
function books_model()
{
parent::__Construct();
}
function post_books()
{
$this->load->database();
$id=$this->input->post('id');
$title=$this->input->post('title');
$text=$this->input->post('text');
$data=array('id'=>$id,'title'=>$title,'text'=>$text);
$this->db->insert('data',$data);
}
Can you guys help me to find where am I doing the mistake ?