title: Get user input from form, write to text file using php
body: <p>As part of a subscriber acquisition I am looking to grab user entered data from a html form and write it to a tab delimited text file using php.The data written needs to be separated by tabs and appended below other data. </p>
  
  <p>After clicking subscribe on the form I would like it to remove the form and display a small message like "thanks for subscribing" in the div. </p>
  
  <p>This will be on a wordpress blog and contained within a popup. </p>
  
  <p>Below are the specific details. Any help is much appreciated.</p>
  
  <p>The Variables/inputs are</p>
  
  <pre><code>$Fname = $_POST["Fname"];
  $email = $_POST["emailPopin"];
  $leader = $_POST["radiobuttonTeamLeader"];
  $industry = $_POST["industry"];
  $country = $_POST["country"];
  $zip = $_POST["zip"];
  </code></pre>
  
  <p>$leader is a two option radio button with 'yes' and 'no' as the values.</p>
  
  <p>$country is a drop down with 40 or so countries. </p>
  
  <p>All other values are text inputs.</p>
  
  <p>I have all the basic form code done and ready except action, all I really need to know how to do is: </p>
  
  <p>How to write to a tab delimited text file using php and swap out the form after submitting with a thank you message?</p>
  
  <p>Thanks again for all the help.</p>