title: HTML File Upload - why use IFrame
body: <p>I have been trying to get file uploads working in IE8.  To only solution I have seen is posting to an IFrame.  Why is this done?  Is it not possible to have a simple form e.g.</p>
  
  <pre><code>&lt;form action="test.php" method="post" enctype="multipart/form-data"&gt;
      Select image to upload:
      &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt;
      &lt;input type="submit" value="Upload Image" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Which submits directly to PHP 
      
  
  <pre><code>if(isset($_POST["submit"])) {
      $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
      if($check !== false) {
          echo "File is an image - " . $check["mime"] . ".";
          $uploadOk = 1;
      } else {
          echo "File is not an image.";
          $uploadOk = 0;
      }
  }
  </code></pre>
  
  <p>Why would an IFrame be needed?</p>
  
  <p>Thanks</p>