title: Mime types for uploading pdf in PHP in different browsers
body: <p>I am creating an web application that allows users to upload pdf documents.  The following is the code to check(Restrict) the document type to pdf.</p>
  <pre><code>if (isset($_POST['submitbutton'])) {
    $name = $_FILES['myfile']['name'];
    $type = $_FILES['myfile']['type'];
    $size = $_FILES['myfile']['size'];
    $tmpname = $_FILES['myfile']['tmp_name'];
    $ext = substr($name, strrpos($name,'.'));  //Get the extension of the selected file
    echo $type.' This is the type';
    echo '&lt;br&gt;';
    if (($type == &quot;application/pdf&quot;)||($type == &quot;application/octet-streamn&quot;)) {
      echo 'ok';
    } else {
      echo &quot;That is not a pdf document&quot;;
    }
  }
  </code></pre>
  <p>I checked the types by echo(ing) $type to the screen.  But the type output is different for firefox.  I just need to confirm the following mime types.  Am I correct when I say:</p>
  <blockquote>
  <p>Internet explorer : application/pdf</p>
  <p>Opera: application/pdf</p>
  <p>FireFox : application/octet-streamn</p>
  </blockquote>
  <p>or is there a standard mime type that covers all existing browsers.  Please help, I am still getting my feed wet with php and files</p>