Skip to main content
added 73 characters in body; added 6 characters in body; edited body
Source Link
Sabeen Malik
  • 10.9k
  • 4
  • 37
  • 51

You can only read cookies which belong to the same domain as the reading script. For instance if the cookie PHPSID27258STATUS was set by domain xyz.com, you can not read it using a script on abc.com. So make sure the domain of your desired cookie is the same. Also show us the code part where you are setting your cookie.

Edit:

setcookie($cookiename, "COMPLETE", (time() + 31536000) , '/'); 

You can only read cookies which belong to the same domain as the reading script. For instance if the cookie PHPSID27258STATUS was set by domain xyz.com, you can not read it using a script on abc.com. So make sure the domain of your desired cookie is the same. Also show us the code part where you are setting your cookie.

You can only read cookies which belong to the same domain as the reading script. For instance if the cookie PHPSID27258STATUS was set by domain xyz.com, you can not read it using a script on abc.com. So make sure the domain of your desired cookie is the same. Also show us the code part where you are setting your cookie.

Edit:

setcookie($cookiename, "COMPLETE", (time() + 31536000) , '/'); 
Source Link
Sabeen Malik
  • 10.9k
  • 4
  • 37
  • 51

You can only read cookies which belong to the same domain as the reading script. For instance if the cookie PHPSID27258STATUS was set by domain xyz.com, you can not read it using a script on abc.com. So make sure the domain of your desired cookie is the same. Also show us the code part where you are setting your cookie.