title: PHP File upload & Edit
body: <p>I have a website and i'm making a content management system for the website. I need to be upload a .txt file and then be able to edit that file inside the website. so far I have this:</p>
  
  <pre><code>&lt;?php
          $myFile = fopen("welcome-content.txt", 'r');
          while (($buffer = fgets($myFile)) !== false) {
              echo "&lt;p&gt;";
              echo $buffer;
              echo "&lt;/p&gt;";
          }
          fclose($myFile);
      ?&gt;
  </code></pre>
  
  <p>This is able to upload the file, but I have to have the file name as "welcome-content.txt", I want to be able too select a file from the File Explorer, upload it, and then be able to edit it. Am I right in thinking I need a HTML Form in order to select the file? But as far as anything else I'm not sure where to go from there.</p>
  
  <p>Any tips?</p>