title: In the next page $_FILES["myfile"]["tmp_name"] = NULL
body: <p>I had upload file with POST and it seems to works fine, but after I go to the next page I can't use the file with the location in the global varible: $_FILES["myfile"]["tmp_name"]
  because it's null. I don't know why, I used this code before and it worked fine...</p>
  
  <p>Here is the code:</p>
  
  <p><strong>www/step1.php</strong></p>
  
  <pre><code>if (isset($_POST["check_if_press"]) &amp;&amp; $_POST["check_if_press"] == "Upload") 
  
  {
  
  if (!empty($_FILES["myfile"]["tmp_name"])) 
  
  {
  
    header("Location: ./step2_1.php");
  
    }else     echo "Please select a file";
  
  }
  
  &lt;form action="&lt;?php echo $PHP_SELF; ?&gt;" method="post" enctype="multipart/form-data"&gt;
  
   Upload file: &lt;input type='file' name='myfile' /&gt;&lt;br /&gt;
  
   &lt;input type='Submit' name='check_if_press' value='Upload'  /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>www/step2_1.php</strong></p>
  
  <pre><code>echo  $_FILES["myfile"]["tmp_name"];
  </code></pre>
  
  <p>Now I get NULL printed on the screen.</p>
  
  <p>When I used POST without the arguments :</p>
  
  <pre><code>action="&lt;?php echo $PHP_SELF
  </code></pre>
  
  <p>But with:</p>
  
  <pre><code>action="./step2.php"
  </code></pre>
  
  <p>Instead, It work, but than I cant use the upload check .</p>
  
  <p>Thanks,</p>
  
  <p>Yonatan.</p>