You can't access cookies from a different path - otherwise it would be a security hole.
In the php manual under section "cookies" it states that you can add multiple values to a single cookie by simply adding a '[]' to the cookie name.
Accessing Cookies with PHP Simplest way is to use either $_COOKIE or $HTTP_COOKIE_VARS variables. Following example will access all the cookies set in above example. You can use isset() function to check if a cookie is set or not.
For those who didn't know, cookies are only accessible to the specified path and any subpaths, no superpaths.
Can a parameter of path be added to $_COOKIE[]?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With