title: Check if image has been selected for upload
body: <p>I have a form were a user can enter text and also upload images.
  Saving the values and images works fine. If the user does not select an image, I get the error message that no file has been selected (Error 4).</p>
  
  <p>How can I run the upload image part only if the user selected an image?</p>
  
  <p>I have tried:</p>
  
  <pre><code>if (!empty($_FILES['files']['name'])){ Upload the Image }
  
  if (!empty($_FILES['files'])){ Upload the Image }
  
  if (!empty($_FILES['files']['name'])) { Upload the Image }
  
  if ($_FILES['files']['error'] == UPLOAD_ERR_OK) { Upload the Image }
  </code></pre>
  
  <p>This the form:</p>
  
  <pre><code>&lt;input type="file" name="files[]" title="Title" maxlength="10" accept="gif|jpg|jpeg|png|tiff"&gt;
  </code></pre>