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.
function insert()
{
$this->load->model('Test');
$this->Test->insert_info();
}
and then the model has
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
