title: Check if file exists in the upload file array
body: <p>I got form at frontend to submit stuff, wherein I need to check if file exists on submit. </p>
  
  <p>Please note that the form submits <strong>array of files</strong>. It is failing the all logics I have been trying. Please notice the <code>upload[]</code> on second line of html.</p>
  
  <p><strong>HTML</strong>  </p>
  
  <pre><code>&lt;form method="post" id="upload-form" action="" enctype="multipart/form-data" &gt;
  &lt;input type="file" multiple="true" name="upload[]"&gt;
  &lt;input type="submit" name="upload_attachments" value="UPLOAD"&gt;
  &lt;form&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>if(!file_exists($_FILES['upload']['tmp_name'].'/'.$FILES['upload']['name'])) {
  
     $upload_error = 'file is not set !'; 
     return; //stop further code execution 
     }else{
  
     //do further validation   
  
     }
  </code></pre>
  
  <p>The code above shows <code>'file is not set !'</code> in both cases, that is when I hit submit button without uploading a file and when I select to upload a file and hit the submit button.</p>
  
  <p>What is happening here, am I even doing it right?</p>
  
  <p>Basically I want to return a 'File Empty' message when someone hits the submit button without selecting a file to upload, and stop the further code execution.</p>