[eluser]MydKnight[/eluser]
This time I actually found other people with the same kinds of issues...but I'm just not up to speed enough to get the solution. Here is what I am seeing when I try to add a new user:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Welcome::$M_user
Filename: controllers/welcome.php
Line Number: 66
Fatal error: Call to a member function createUser() on a non-object in /home/abadmin1/public_html/rework/system/application/controllers/welcome.php on line 66
here is the controller:
function usr_register()
{
if ($this->input->post('username')){
$this->M_user->createUser();
$this->session->set_flashdata('message','User added');
redirect('index','refresh');
}else{
$data['title'] = "ABC User Registration";
$data['navlist'] = array(
'home' => 'Home'
);
$data['main'] = 'users/user_create';
$this->load->vars($data);
$this->load->view('abctemplate');
}
}
And here is an (abbreviated) function from the model:
function createUser(){
$this->username = $this->input->post('username');
$this->user_password = $this->input->post('user_password');
$this->user_email = $this->input->post('user_email');
.
.
.
$this->user_contype = $this->input->post('user_contype');
$this->db->insert('phpbb_users',$this);
}
What am I doing wrong this time?