title: How can i get the cookie value from header to template pages in wordpress?
body: <p>I have set the cookie in header.php like below</p>
  
  <pre><code>&lt;?php if($_GET['signup'] == '123' &amp;&amp; !isset($_COOKIE['sign'])){
      setcookie("sign", "1", time()+3600);
  } ?&gt;
  </code></pre>
  
  <p>now i need to get this cookie value in the page signup.php. but i cant retrive the value in that page. in Signup.php page i am using the below code for check the cookie,</p>
  
  <pre><code>&lt;?php
  /**
  Template Name:  Sign Up
   */
  $ck = $_COOKIE['sign'];
  echo "cookie".$ck;
  if(isset($_COOKIE['sign'])){
      header("Location: https://www.ap.com/app/signup.jsp?signup=123");
  }
  else
  {
      header("Location: https://www.ap.com/app/signup.jsp");
  }
  ?&gt;
  </code></pre>
  
  <p>but it goes to the else condition only (if the cookie is set also). kindly advice...</p>