My profiles Model file:
function putProfileImage($user, $image)
{
$record = array('user' => $user, 'profileimage' => $image);
if ($this->exists($user))
{
$this->db->where('user', $user)->update('profiles', $record);
}
else
{
$this->db->where('user', $user)->insert('profiles', $record);
}
}
function getProfileImage($user)
{
$config = array(
'allowed_types' => 'jpg|jpeg|gif|png',
'height' => 200,
'length' => 150
);
$this->db->select('*')->from('profiles')->where('user', $user);
$query = $this->db->get();
$row = $query->row();
return $row->profileimage; //Trying to get property of non-object error
}
its the getProfileimage, similar to a do_upload function where im having the most trouble
I managed to fix this issue by saving to the correct image location folder