Ok this might be a simple problem but I cannot figure this out at all.... I am trying to check if the user is trying to upload a file, upload it else execute some other code, but:
if(isset($_FILES['rv_img']['name']) && !empty($_FILES['rv_img']))
{
echo "here ";print_r($_FILES);
}
else
{
echo "no file uploaded";
}
I want to see "no file uploaded" cause I am submitting the form with blank file input field.. but instead I am getting:
here Array ( [rv_img] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [thumb_img] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) )