Issue
I have a form with a file field called image
, but this field is not required.
When user don't choose any file in form, the do_upload()
always return a error.
How can I check if user chosen a file before perform the upload action in my controller?
Solution
Please use empty()
if (empty($_FILES['userfile']['name'])) {
}
Answered By - Vinoth Babu
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.