Hello, Could someone, please, help me? I am trying to set cookie in a folder to be available to that folder and ALL subfolders, but it doesn't work and nothing helps, I tried a lot of variations. Here is what documentation says should work for me: $_COOKIE['signed_in'] = true; setcookie("signed_in", $_COOKIE['signed_in'], 0, '/WEB/portal/', 'localhost'); PHP: But when I set this cookie from http://localhost/WEB/portal/ it isn't set at all - when I reload the page it disappears. When I use the following code, the cookie is set in current folder ONLY, and doesn't work for neither parent folders nor subfolders: $_COOKIE['signed_in'] = true; setcookie("signed_in", $_COOKIE['signed_in'], 0); PHP: Please, help me.. I need my cookie work both in http://localhost/WEB/portal/ and http://localhost/WEB/portal/tags/computers/ and so similar.
Also, forgot to say the following code also doesn't set a cookie at all (I mean I can't see it from the script): $_COOKIE['signed_in'] = true; setcookie("signed_in", $_COOKIE['signed_in'], 0, '/', 'localhost'); PHP: while it should work for all the domain, it doesn't, and that is veery strange.
Instead of $_COOKIE['signed_in'] = true; Can you please try $_COOKIE['signed_in'] = "yes"; and if it sets the cookie