title: cookie not passing to page
body: <p>hello i am trying to pass a cookie from one page to another, and its just not working for some reason</p>
  
  <p>i set the cookie in php.</p>
  
  <p>Page a:</p>
  
  <pre><code>   &lt;?php $cc= 'testcookie';
      setcookie("cc", $video, time()+36000);
       ?&gt;
  </code></pre>
  
  <p>and i try to read the cookie in JS.</p>
  
  <p>Page b:</p>
  
  <pre><code>function readCookie(name) {  
  
  var cookiename = name + '=';  
  
  var ca = document.cookie.split(';');  
  
  for(var i=0;i &lt; ca.length;i++)  
  {  
  
      var c = ca[i];  
  
      while (c.charAt(0)==' ') c = c.substring(1,c.length);  
  
      if (c.indexOf(cookiename) == 0) return c.substring(cookiename.length,c.length);  
  
  }  
  
  return null;  
  }
  </code></pre>
  
  <p>and i always get null...</p>
  
  <p>when i try to set the cookie in the same page that i try to read it, it works... </p>
  
  <p>any ideas?</p>