Cookies being created but unable to echo them
<p>At the end of my registration script I set a cookie of 'loggedin' like so</p>

<blockquote>
  <p>setcookie("loggedin", $username,  time()+60*60*24*30 );</p>
</blockquote>

<p>And then just redirect back to the home page.</p>

<p>I'm trying to echo out the contents of that cookie. I can see it has been created when I go right click > page info > security > view cookies.</p>

<p>The name of the cookie is there, 'logged in' with contents set to as the username I register as. But when I do something like </p>

<blockquote>
  <p>print_r ($_COOKIE);</p>
</blockquote>

<p>Nothing shows.</p>

<p>Doing a </p>

<blockquote>
  <p>var_dump($_COOKIE);</p>
</blockquote>

<p>Gives</p>

<pre><code>array (size=0)
  empty
</code></pre>

<p>Why might this behavior be occurring if I can see that the cookie is indeed there when I follow the previous steps mentioned? </p>
