Jump to content

cookie??


jwilson122

Recommended Posts

I have a question about cookies :):P

 

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
Share on other sites

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
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.