title: PHP display contents of user uploaded file after submit (preferably without mySQL)
body: <pre><code>&lt;html&gt;
      &lt;title&gt;TestUploader&lt;/title&gt;
      &lt;body&gt;
  
          &lt;?php
              if (isset($_POST['Submit1'])) { 
                  //display contents of file that was uploaded
              }
          ?&gt;
  
          &lt;form name="form1" method="POST" action="testupload.php"&gt;
              &lt;div&gt;
                  Upload A File 
                  &lt;br /&gt;
                  &lt;input type="file" name="UserFile" size="50"/&gt; 
                  &lt;br /&gt; 
                  &lt;input type="submit" value="Upload" name="Submit1"/&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What I am trying to do (and not really finding anything online in terms of examples) is have the user upload a file on their local machine and have PHP read it back to me.</p>
  
  <p>In terms of the actual conditions within my project, it will be a CSV file that I would like to put into an array - but I can't figure out how to do this even with a simple txt file with contents 'hello world'</p>
  
  <p>how i have it constructed in my mind is through POST but i am very novice at php at the moment and do not know if there is a better practice. Could anybody give me guidance or a resource for what i am trying to do? I would prefer to not use MySQL simply because I do not know MySQL yet and am trying to not learn too many things at once and the rest of my project currently does not use it.</p>