Welcome Guest, Not a member yet? Register   Sign In
login system, how to go from controller to view to model
#9

[eluser]jvittetoe[/eluser]
ok. my query is adding records to the table just fine. but it seems as though its breaking right after that.
Code:
$this->load->model('actSignUp', '', TRUE);
            $query = $this->actSignUp->addUser(
                $this->input->post('firstname'),
                $this->input->post('lastname'),
                $this->input->post('emailaddress'),
                $this->input->post('username'),
                $this->input->post('password')
                );
                
//I BELIEVE THE FOLLOWING IS NOT BEING RUN...OR QUERY IS FALSE AND THEREFOR LOADING THE SIGNUP VIEW INSTEAD OF THE DASHBOARD VIEW.

            if($query){
                $this->load->view('dashboard');
            } else {
                $this->load->view('signUp');
            }

heres my model, ive added the line return TRUE, thinking that would return $query to be true. but that doesn't seem to fix the issue.
Code:
function addUser(){
        
        $data = array(
            
            'firstname' => $_POST['firstname'],
            'lastname' => $_POST['lastname'],
            'emailaddress' => $_POST['emailaddress'],
            'username' => $_POST['username'],
            'password' => $_POST['password']
            
            );
            
        $this->db->insert('useraccounts', $data);

        return TRUE;
        
    }

any thoughts?


Messages In This Thread
login system, how to go from controller to view to model - by El Forum - 06-26-2007, 11:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB