Welcome Guest, Not a member yet? Register   Sign In
Model/Controller Quick Question
#1

[eluser]ikim[/eluser]
Hi,

Im starting to learn how to keep all database stuff inside models and separate it from the controllers. However, Ive been looking around and I cant seem to understand how to insert data into the database.

Right now I have a small form in my view sending the form to the controller.
Code:
function insert()
{        
$this->load->model('Test');
$this->Test->insert_info();
}

and then the model has
Code:
function insert_info()
    {    
        $data['user_id'] = $_POST['user_id'];
        $data['about_me'] = $_POST['about_me'];
        $data['tagline'] = $_POST['tagline'];
    
        $this->db->set('personality', $data);
     }


What am I missing? Ive been reading the user quide and trying to find something on the forum but I cant seem to find anything.

Thanks for the help


Messages In This Thread
Model/Controller Quick Question - by El Forum - 07-02-2007, 04:21 PM
Model/Controller Quick Question - by El Forum - 07-02-2007, 04:49 PM
Model/Controller Quick Question - by El Forum - 07-02-2007, 05:28 PM
Model/Controller Quick Question - by El Forum - 07-03-2007, 02:18 AM
Model/Controller Quick Question - by El Forum - 07-03-2007, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB