title: HTML form to go to new page and start download
body: <p>I have an HTML form like so:</p>
  
  <pre><code>&lt;form method="post" enctype="multipart/form-data" action="script.php" align="center"&gt;
      &lt;input type="submit" value="Run Program"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Then I have the PHP page, script.php. I would it to be displayed and also begin a download automatically. However, when I add the header for starting the download:</p>
  
  <pre><code>header('Content-Description: File Transfer');
  header('Content-Disposition: attachment; filename=' . $_FILES['upload']['name'] . '.tbx');
  header('Content-Type: application/force-download');
  header('Content-Length: ' . filesize($tbx));
  </code></pre>
  
  <p>the download is started but the page itself is not loaded (probably because the headers say that we are just going to transfer a file). How do I make the page properly display <em>and</em> automatically start a download?</p>