title: php file not uploading to temp directory
body: <p>//uploadForm.html</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;form action="upload_file.php" method="post" enctype="multipart/form-data"&gt;
              &lt;label for="browseFile"&gt;Filename : &lt;/label&gt;
              &lt;input type="file" name="file" id="browseFile"&gt;&lt;br&gt; 
              &lt;input type="submit" name="submit" value="Submit"&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>//upload_file.php</p>
  
  <pre><code>&lt;?php
    $allowedExt = array("png","jpg");
      $temp = explode(".",$_FILES["file"]["name"]);
      $extension = end($temp);
      echo "uploading...";
      if((($_FILES["file"]["type"]=="image/png") || ($_FILES["file"]["type"]=="image/jpg")) &amp;&amp; ($_FILES["file"]["size"] &lt; 1000000))
      {
          echo "success";
          if($_FILES["file"]["error"] &gt; 0)
          {
              echo "error in uploading" . $_FILES["file"]["error"]."&lt;br&gt;";
          }
          else
          {
              echo "&lt;p&gt;uploaded successfully&lt;/p&gt;";
          }
      }
      else
          echo "invalid file" ;
  
      echo $_FILES["file"]["name"]."stored in ".$_FILES["file"]["tmp_name"]."&lt;br&gt;";
      move_uploaded_file($_FILES["file"]["tmp_name"],"uploads/".$_FILES["file"]["name"]);
      echo "moved Successfully";
  
  ?&gt;
  </code></pre>
  
  <p>When I try to echo the temp directory name , it is blank . The uploaded files are missing .
  I dont get it in the <code>MAMP/htdocs</code> folder neither in <code>/tmp/</code> directory .</p>
  
  <p>I dont have <code>uploads</code> directory in <code>/MAMP/htdocs/</code> .Wont the program create a directory if it does not exist ? </p>