I basically have an edit profile page that along with other fields has a option to upload a picture. Now the problem I have is determining wether or not they submitted a file or left it blank(default).
My current code:
if($this->input->post('user_pic') === FALSE)
{
//Don't do anything.
} else {
//Proccess upload.
}
The form is done correctly with multi-part and all, and other values do update, so I am assuming that this exact code that isn’t working.
The problem is that even if I do submit a file it remains just like it was, or another words doesn’t do anything. Am I doing this wrong?
you can check so:
if(isset($_FILES['user_pic']))CodeIgniter method:
CodeIgniter File Uploading Class