title: PHP Video Format Upload Issue
body: <p>This is my first foray into php and my project is for users to be able to upload video files to the server. I am using the following php code (found <a href="https://stackoverflow.com/questions/18217964/upload-video-files-via-php-and-save-them-in-appropriate-folder-and-have-a-databa">here</a>) and am encountering an issue where the files upload but do not copy/save to the server. Every upload ends in the 'Invalid file' echo, despite the appropriate extensions being listed in the array. The php.ini upload settings have been increased. </p>
  
  <p>Example: .mov file is being uploaded, uploads to 100%, yields invalid file echo and file isn't saved to server.  </p>
  
  <p>Any advice would be appreciated. </p>
  
  <pre><code>&lt;?php
  
  $allowedExts = array("mp4", "mpg", "mpeg", "mov", "avi", "flv", "wmv");
  $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
  
  if ((($_FILES["file"]["type"] == "video/mp4")
  || ($_FILES["file"]["type"] == "video/mpg")
  || ($_FILES["file"]["type"] == "video/mpeg")
  || ($_FILES["file"]["type"] == "video/mov")
  || ($_FILES["file"]["type"] == "video/avi")
  || ($_FILES["file"]["type"] == "video/flv")
  || ($_FILES["file"]["type"] == "video/wmv"))
  
  &amp;&amp; ($_FILES["file"]["size"] &lt; 3145728000)
  &amp;&amp; in_array($extension, $allowedExts))
  
    {
    if ($_FILES["file"]["error"] &gt; 0)
      {
      echo "Return Code: " . $_FILES["file"]["error"] . "&lt;br /&gt;";
      }
    else
      {
      echo "Upload: " . $_FILES["file"]["name"] . "&lt;br /&gt;";
      echo "Type: " . $_FILES["file"]["type"] . "&lt;br /&gt;";
      echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb&lt;br /&gt;";
      echo "Temp file: " . $_FILES["file"]["tmp_name"] . "&lt;br /&gt;";
  
      if (file_exists("uploads/" . $_FILES["file"]["name"]))
        {
        echo $_FILES["file"]["name"] . " already exists. ";
        }
      else
        {
        move_uploaded_file($_FILES["file"]["tmp_name"],
        "uploads/" . $_FILES["file"]["name"]);
        echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
        }
      }
    }
  else
    {
    echo "Invalid file";
    }
  ?&gt;
  </code></pre>