title: Pass value to the previous webpage in php
body: <p>I want to know how I can pass value by cookie from one page to the pervious one , </p>
  
  <p>This is my code </p>
  
  <p>Readcookie.php</p>
  
  <pre><code>&lt;?php 
  foreach($_COOKIE as $key =&gt; $value)
      {echo("&lt;p&gt;$key: $value&lt;/p&gt;");
      $name=($_COOKIE['name']);
  
      }
  
       print('&lt;a href="coockie.php?name:"'.$name'&gt;Go to Home&lt;/a&gt;');
      ?&gt;
  </code></pre>
  
  <p>Cookie.php</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;?php  
   $name=$_GET['name'];
   echo'Hello'.$name;
   ?&gt;
  &lt;form method="post" action="setcookie.php"&gt;
  &lt;label&gt;Name&lt;input type="text" name="name"&gt;&lt;/label&gt;
  &lt;label&gt;Age&lt;input type="number" name="age"&gt;&lt;/label&gt; 
  &lt;input type="submit" name="submit"&gt;
  
  &lt;/form&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>setcookie.php</p>
  
  <pre><code>&lt;?php 
  
  setcookie("name" , $_POST['name'] , time()+60*60*24*1);
  setcookie("Age" , $_POST['age'] , time()+60*60*24*1);
  
  
  ?&gt;
  
  &lt;p&gt; To read cookie click &lt;/p&gt; 
  
  &lt;a href="readcookie.php"&gt;Here&lt;/a&gt;
  </code></pre>
  
  <p>What I want when I go back from readingcookie.php page to Coockie.php page , 
  I found Welcome username ???</p>