[eluser]VirtualDevel[/eluser]
Hi, first off, thanks for looking at this. Okay so my confusion is the use of $_POST or any other such super within a controller vs model.
Where is the 'right' place for it. For example, in the user guide under the model section there is this piece of code:
Code:
function insert_entry()
{
$this->title = $this->input->post('title'); // please read the below note
$this->content = $this->input->post('content');
$this->date = time();
$this->db->insert('entries', $this);
}
But in other documentation I have seen it done other ways, for example:
Code:
// controller
$data['title'] = $this->input->post('title')
$data['content'] = $this->input->post('content')
$data['date'] = time();
$this->model->insert_entry($data)
// model
function insert_entry( $data = array() )
{
$this->db->insert('entries', data);
}