title: $_FILES['file_upload']['tmp_name'] is undefined
body: <p>I am writing a upload file page. Here's the html code:</p>
  
  <pre><code>&lt;form action="verify.php" id="upload" method="post" enctype="multipart/form-data"&gt;
  &lt;input id="file_upload" type="file" name="file_upload" /&gt;
  &lt;button id="submit" name="submit" type="submit"&gt;Upload&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And this is my php code:</p>
  
  <pre><code>if ($_FILES['file_upload']['error']==UPLOAD_ERR_NO_FILE){
      return;
    }  
    try{
      $email_add='MY@gmail.com';
      $subject="Driver Verification";
      $mail = $this-&gt;emailConfig();      
      $mail-&gt;addAddress($email_add, "LALALA");  // Add a recipient
      $mail-&gt;Subject = $subject;
      echo $_FILES['file_upload']['name'];
      echo $_FILES['file_upload']['tmp_name'];
      $mail-&gt;Body    = "This driver requires a verification."
      $mail-&gt;AddAttachment($_FILES['file_upload']['tmp_name'],$_FILES['file_upload']['name']);
      if(!$mail-&gt;send()) {
        echo 'Message could not be sent.';
        echo 'Mailer Error: ' . $mail-&gt;ErrorInfo;
        exit;
      }
      return;     
    }
    catch(PDOException $e){
      return;
    }
  }
  </code></pre>
  
  <p>So when I run the code, it just can echo ['name'] but can't echo ['tmp_name'], and thus there's no attachment in the email.</p>
  
  <p>Any thoughts? Thanks.</p>