title: why doesn't my file upload script work?
body: <p>Do you see what's wrong here? I can't find anything. </p>
  
  <p>this prints:</p>
  
  <pre><code>echo $_FILES["new_text_file"]["name"];
  </code></pre>
  
  <p>and this too:</p>
  
  <pre><code>echo $_FILES["new_text_file"]["tmp_name"];
  </code></pre>
  
  <p><strong>php:</strong>
      <br />";
          echo $_FILES["new_text_file"]["tmp_name"];
              //Uploads the text file to the server       </p>
  
  <pre><code>        if(move_uploaded_file($_FILES["new_text_file"]["tmp_name"]), $_FILES["new_text_file"]["name"]) 
          {
              //header('Location: ga-dev-exercise-pavan.php');
              echo 'worked';
          }else {
              echo 'did not work';
          }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>html:</strong></p>
  
  <pre><code>    &lt;form enctype="multipart/form-data" action="ga-dev-exercise-pavan.php" method="POST"&gt;
          Choose a text file you want to upload and search through: 
          &lt;input type='file' name='new_text_file'&gt;
  
          &lt;input type="hidden" name="submit_yes_file" value="true" /&gt;
          &lt;br /&gt;&lt;br /&gt;
          &lt;input type="submit" value="upload"&gt;
      &lt;/form&gt;
  </code></pre>