title: how to use $_POST in wordpress
body: <p>Hey i am trying to retrive data from a basic form .. but when i am using $_POST['field name'] then it gives me nothing . </p>
  
  <p>here is my basic code</p>
  
  <p>form page is:</p>
  
  <pre><code>&lt;?php
  /**
  
  Template Name: galaxy
   */
  
  get_header(); ?&gt;
  
  &lt;div id="main-content" class="main-content"&gt;
  
  &lt;form action="&lt;?php echo site_url();?&gt;?page_id=8" method="post"&gt;
  &lt;input type="text" name="name"  /&gt; &lt;input type="submit" value="Send"  /&gt;
  
  &lt;/form&gt;
  
  &lt;/div&gt;&lt;!-- #main-content --&gt;
  
  &lt;?php
  get_footer();
  </code></pre>
  
  <p>when i click submit it redirects to next page but display nothing with this code</p>
  
  <pre><code>&lt;?php
  /**
  
  Template Name: get_value_galaxy
   */
  
  
  $name=$_POST['name'];
  echo $name;
  
  print_r($_POST);
  
  ?&gt;
  </code></pre>