jwilson122 Posted January 4, 2011 Share Posted January 4, 2011 I have a question about cookies I want the cookie to work on all the paths / folders / directorys located in a root path. So say like.. http://www.site.com/members/login.php is the folder which sets the cookie, then this cookie will also work on like.. http://www.site.com/bla/boo/works.php I'm trying to do: setcookie(Data1, 'valueofthecookie', '/', '.site.com', 1); But its not working... Quote Link to comment Share on other sites More sharing options...
johnny86 Posted January 4, 2011 Share Posted January 4, 2011 From PHP manual: bool setcookie ( string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]]]] ) The path is the fourth argument for the function, not third. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.