On one page I have something like this
setcookie('user', 'value' ,6000, '/', 'mydomain.co.uk');
On the next page I have
var_dump($_COOKIE);
I see everything automatically generated, for example PHPSESSID , but I do not see user .
If I do echo setcookie('user', 'value' ,6000, '/', 'mydomain.co.uk'); , it returns true . Therefore, I am not sure why I do not see this.
I tried a lot of different ideas, but nothing worked. Also, I use .htaccess to redirect all requests through a single index.php page, not sure if this is doing anything.
php cookies
Alex
source share