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... Link to comment https://forums.phpfreaks.com/topic/223414-cookie/ 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. Link to comment https://forums.phpfreaks.com/topic/223414-cookie/#findComment-1154953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.