title: PHP file upload error tmp_name is empty
body: <p>I have this problem on my file upload. I try to upload my PDF file while checking on validation the <code>TMP_NAME</code> is empty and when I check on <code>$_FILES['document_attach']['error']</code> the value is 1 so meaning there's an error.</p>
  
  <p>But when I try to upload other PDF file it's successfully uploaded. Why is other PDF file not?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action="actions/upload_internal_audit.php" method="post" enctype="multipart/form-data"&gt;
     &lt;label&gt;Title&lt;/label&gt;
     &lt;span&gt;&lt;input type="text" name="title" class="form-control" placeholder="Document Title"&gt;&lt;/span&gt;  
     &lt;label&gt;File&lt;/label&gt;  
     &lt;span&gt;&lt;input type="file" name="document_attach"&gt;&lt;/span&gt;&lt;br&gt;
     &lt;span&gt;&lt;input type="submit" name="submit" value="Upload" class="btn btn-primary"&gt;&lt;/span&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>if(isset($_POST['submit'])){
  
  $title = $_POST['title'];
  $filename = $_FILES['document_attach']['name'];
  $target_dir = "../eqms_files/";
  $maxSize = 5000000;
  
  if(!empty($title)){
  
      if(is_uploaded_file($_FILES['document_attach']['tmp_name'])){
          if ($_FILES['document_attach']['size'] &gt; $maxSize) {
                  echo "File must be: ' . $maxSize . '";
          } else {
  
                  $result = move_uploaded_file($_FILES['document_attach']['tmp_name'], $target_dir . $filename);
                  mysqli_query($con, "INSERT into internal_audit (id, title, file) VALUES ('', '".$title."', '".$filename."')");
                  echo "Successfully Uploaded";
          }   
      }else
          echo "Error Uploading try again later";
  
  }else
      echo "Document Title is empty";
  
  }
  </code></pre>