[eluser]gunner0007[/eluser]
Thanks for the help, will go through this. Does anyone have any other links or good books/tutorials where I can learn CI?
[quote author="Sanjay Sarvaiya" date="1341385885"]use code tags for code samples.
as per CI-Structure pass operational data from controller to model
your controller code will look like
Code:
//controller
public function update() {
$this->load->helper(‘form’);
$data[‘heading’] = ‘Enter Info Here’;
$data[‘title’] = ‘Update Blog’;
$this->load->model(‘news_model’);
$data['blog'] = array('content', $this->input->post('entry'));//
$data[‘data’] = $this->news_model->insert_blog($data['blog']);//
$this->load->view(‘update_blog’,$data);
}
//model insert method you have to do just no need to load any library.
public function insert_blog() {
$this->db->insert(‘blog’, $data);
echo $this->db->last_query();die();//your insert query.
}
[/quote]