Hi all,
I have some issue using cookies in PHP. As it seems very easy to use cookies with php
I am using setcookie(name, value, expire, path, domain); function to set cookie and retrieve its value using $_COOKIE superglobal variable
I want to set cookie in my sub folder like panel and access it in root folder. As we can set the cookie in sub folder using the path. But how can we access cookie from root which is set to a sub folder.
Means to access cookie of some sub folder at root of website.
br
cksonline
Using PHP cookies
Moderator: General Moderators
Re: Using PHP cookies
The "path" isn't where the cookie is being set but where it should be available. If you use path=/folder only files located somewhere in /folder (could be a subdirectory, or a sub-subdirectory...) can get to that cookie.
Just use / for the path.
Just use / for the path.
Re: Using PHP cookies
thankx tasairis... 