[eluser]Michal1[/eluser]
Hey guys,
I have a problem with function in site controller. I am inserting a data into database and I have an easy function in my controller
Code:
function create_user()
{
$users = array(
'username'=>$this->input->post('username'),
'password'=>$this->input->post('password')
);
$this->site_model->userd($users);
}
Then I have model: site_model and inside
Code:
function userd($users)
{
$this->db->insert('users,$users');
return;
}
Then when I enter data into inputs and click on submit in my view I get this:
Code:
Fatal error: Call to undefined method Site_model::userd() in........
Why? Everything seems fine to me in the code.
Thank you