title: Form method - POST delete previous data
body: <p>I am trying to get some data from page to page and then mail them. </p>
  
  <p>So from one form I am getting a title of item : </p>
  
  <pre><code>//Form1
  &lt;form  class="orderFormFields" method="post" action="order"&gt;
  &lt;input type="hidden" name="productName" value="&lt;?php the_title(); ?&gt;"&gt;
  &lt;input class="oButton" value="Order" type="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And then is another form (next page) with other fields witch I need to mail :</p>
  
  <pre><code>&lt;?php 
  //getting a variable from previous form
  $product = $_POST['productName'];
  
  if(isset($_POST['submit'])) 
  {
  $name = $_POST['order_name'];
  $mail = $_POST['email'];
  $phone = $_POST['mobile'];
  $date = $_POST['date'];
  $comment = $_POST['comment'];
  
  
  
  //simple mail function goes here
  
  $done = true;
  }
  
  ?&gt;
  
  //Form2 goes here
  </code></pre>
  
  <p>So if I insert <code>&lt;?php echo $product; ?&gt;</code> before <code>if(isset($_POST['submit']))</code> I can see my variable from previous page and all works just find. But when I am inserting that same variable in mail function witch is inside   <code>if(isset($_POST['submit']))</code> , I cant mail that variable, seems like it is empty. </p>
  
  <p>Does form method POST delete all previous form data? Because, if I change my Form1 method to GET and <code>$product = $_POST['productName'];</code> to <code>$product = $_GET['productName'];</code> I am getting that variable after Form2 submit and I can mail that variable. But I would like to prefer using POST method, because of nice URL.</p>