[eluser]PermanaJ[/eluser]
I have a form where there are two input field, and a file upload field. How can I make this file upload field optional ? user can provide file or not because when I use file upload class, It always return "You did not select a file to upload."
First, I try this code :
Code:
if( isset ($_FILES['photo']) ){
if( !$this->upload->do_upload('photo')){
$upload_error = $this->upload->display_errors();
}else{
$photo = $this->upload->data();
}
}
It doesn't work, return same error message.