Before anyone does, please don't lecutre me on how sessions are better than cookies... I know.. I just can't work with sessions yet without burning my house down.
Ok. I'm using cookies to identify logged users.
The cookie is set in the directory "/users/", however, it only identifies people in "/users/" and "/users/msgs/" .... so, how would I go about setting the cookie so it works all over the site?
Thanks,
me
Cookies all over? :O
Moderator: General Moderators
-
Terencentanio
- Forum Commoner
- Posts: 27
- Joined: Mon Dec 06, 2004 10:32 am
- Location: England
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Terencentanio
- Forum Commoner
- Posts: 27
- Joined: Mon Dec 06, 2004 10:32 am
- Location: England
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Terencentanio
- Forum Commoner
- Posts: 27
- Joined: Mon Dec 06, 2004 10:32 am
- Location: England
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
you're probably just setting the cookie like so:
this will default the cookie to only work within the directory and domain the user was under at that time..
setting the path argument to / and the domain to '.yourdomain.com' should work best. Note the period before your domain name.
Code: Select all
setcookie('name', 'value', 102137097157);setting the path argument to / and the domain to '.yourdomain.com' should work best. Note the period before your domain name.