title: error in uploading file larger than 2 mb
body: <p>I have 2 php files:
  1st
  name form_upload.php</p>
  
  <pre><code> &lt;html&gt;
      &lt;head&gt;&lt;title&gt;File Upload&lt;/title&gt;&lt;/head&gt;
      &lt;body&gt;
      &lt;ol&gt;
          &lt;li&gt;Enter the file name of the product picture you want to upload or the the browse button to navigate to the picture file&lt;/li&gt;
          &lt;li&gt;when the path to the picture file shows in the text field, click the upload picture&lt;/li&gt;
      &lt;/ol&gt;
  
      &lt;form enctype="multipart/form-data" action="uploadFile.php" method="POST"&gt;
      &lt;input type="hidden" name="MAX_FILE_SIZE" value="500000"/&gt;
      &lt;input type="file" name="pix" size="60"/&gt;
      &lt;p&gt;&lt;input type='submit' name="Upload" value="Upload picture"/&gt;&lt;/p&gt;
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>2nd: uploadFile.php</p>
  
  <pre><code>&lt;?php
  
  if(!isset($_POST['Upload']))
  {
      include("form_upload.php");
  }
  else
  {
      if($_FILES['pix']['tmp_name']=="none")
      {
          echo "file did not successfully upload. Check the file size. File must be less than 500K";
          include("form_upload.php");
          exit();
      }
      if(!preg_match("/image\/jpeg/",$_FILES['pix']['type']))
      {
          echo "only jpg files are allowed. Please try another file";
          include("form_upload.php");
          exit();
      }
      else
      {
          $destination='C:\xampp\htdocs\test\hinh\ '.$_FILES['pix']['name'];
          $temp_file=$_FILES['pix']['tmp_name'];
              move_uploaded_file($temp_file,$destination);
          echo "&lt;p&gt;the file has successfully uploaded :{$_FILES['pix']['name']} {$_FILES['pix']['type']} ({$_FILES['pix']['size']}) &lt;/p&gt;";
  
  
      }
  }
  </code></pre>
  
  <p>I can not output the first statement. When i upload a picture that larger than 2MB, it always output the second one. Did i do something wrong ?</p>