Hello! I'm relatively new to PHP and I've just started playing with cookies... I understand the mechanism and that the $HTTP_COOKIE_VARS array wont be updated by setcookie() and such like... I just wanted to check though...
What is the corrent "path" parameter to pass to setcookie(), and why?
So, for example, if the page www.someserver.com/somefile.php checks the $HTTP_COOKIE_VARS array, it only seems to find any cookies set using
setcookie($somekey, $somevalue, $someexpireytime, $PHP_SELF, $HTTP_HOST);
...if I pass anything else in other that $PHP_SELF as the path, it saves it in a different cookie-file and wont be in the $HTTP_COOKIE_VARS array next time round.
What if I were to also have someotherfile.php that needs to be able to check the same cookie? How on earth would I do that!?
I thank anyone who can answer this question in advance! :p