title: Create file PHP file on form submit and frwite to it
body: <p>Here's my code: </p>
  
  <h2><strong>The PHP Code</strong></h2>
  
  <pre><code>&lt;?php
      if(isset($_POST['Submit'])){
      $title ='myPost.php';
      echo $title;
      //the data
  
      $data = "Hey I am Aidan\n";
  
      //open the file and choose the mode
  
      $fh = fopen($title, "a");
      fwrite($fh, $data);
  
      //close the file
  
      fclose($fh);
      }
  ?&gt;
  </code></pre>
  
  <h2><strong>The HTML Form Code</strong></h2>
  
  <pre><code>&lt;form action="&lt;?php echo $title; ?&gt;" method="post"&gt;
  &lt;input type="submit" name="Submit" value="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When form is submitted I want to load that newly created file on the next page.</p>