title: write to a text file from HTML form using PHP
body: <p>I wrote a html form just with an email field. I want to transfer that email that the user
  inputs into a text file on my web server.</p>
  
  <p>When I click on the submit button I get a white screen. Nothing is written to my text file. 
  I also want to redirect the user to another page when they click the submit button.
  Is this possible? I am a newbie.</p>
  
  <pre><code>&lt;?php
  
  $file = fopen("emaillist.txt","a+");
  fwrite($file,$email);
  fclose($file); 
  print_r(error_get_last());
  
  ?&gt;
  
  &lt;form action= "emaillist.php" method="post" name="email "&gt;
  &lt;input type="text" name="email"&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;input type="submit" name="email" value="submit"&gt;&lt;br&gt;
  </code></pre>