[eluser]Michael Wales[/eluser]
No, he's right. Look one line up:
Code:
$file = $this->upload->data();
$data = array(
'title' => $_POST['title'],
'body' => $_POST['body'],
'image' => $file['file_name']
);
He's getting the metadata of the file, assigning it to an array called $file, and then using that to populate his database. Everything's good there.
Of course, this makes me question why he's getting the data of the file in the Controller:
Code:
$forsaleimage = $this->upload->data();
You're not doing anything with it?