title: Can't Read cookie in another page of my website PHP
body: <p>I set cookie in one page</p>
  
  <pre><code>http://www.example.com/test.php
  </code></pre>
  
  <p>code is like this:</p>
  
  <pre><code>&lt;?php
  $cookie_name = "user";
  $cookie_value = "Alex Porter";
  setcookie($cookie_name, $cookie_value, time() + (86400 * 30) , '/',
  '.example.com' );
  ?&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;?php
  if(!isset($_COOKIE[$cookie_name])) {
      echo "Cookie named '" . $cookie_name . "' is not set!";
  } else {
      echo "Cookie '" . $cookie_name . "' is set!&lt;br&gt;";
      echo "Value is: " . $_COOKIE[$cookie_name];
  }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Its working. and print cookie will give right result.</p>
  
  <p>Now i try to access same cookie in </p>
  
  <pre><code>http://www.example.com/test1.php
  </code></pre>
  
  <p>after loading  </p>
  
  <pre><code>http://www.example.com/test.php
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>&lt;?php
  if(!isset($_COOKIE[$cookie_name])) {
      echo "Cookie named '" . $cookie_name . "' is not set!";
  } else {
      echo "Cookie '" . $cookie_name . "' is set!&lt;br&gt;";
      echo "Value is: " . $_COOKIE[$cookie_name];
  }
  ?&gt;
  </code></pre>
  
  <p>But its not working. Result:</p>
  
  <p>Cookie named '' is not set!</p>
  
  <p>I am Using Shared server in Godaddy</p>