Welcome Guest, Not a member yet? Register   Sign In
Call to undefined method Site_model::userd() I do not get it
#1

[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


Messages In This Thread
Call to undefined method Site_model::userd() I do not get it - by El Forum - 07-30-2011, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB