Page 1 of 1
Cookies all over? :O
Posted: Sat Jan 22, 2005 4:17 pm
by Terencentanio
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
Posted: Sat Jan 22, 2005 4:23 pm
by John Cartwright
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.
Well why don't you ask about how to properly use sessions, since they are, better. (in most cases)
Posted: Sat Jan 22, 2005 4:24 pm
by Terencentanio
I know how to properly use them.. but like I said, they make me burn my house down.
Posted: Sat Jan 22, 2005 4:32 pm
by John Cartwright
Why..
Posted: Sat Jan 22, 2005 4:36 pm
by Terencentanio
Dunno.. guess I don't understand them, they require too much code... and I'd have to do a <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> load of editing.
Posted: Sat Jan 22, 2005 7:47 pm
by feyd
you're probably just setting the cookie like so:
Code: Select all
setcookie('name', 'value', 102137097157);
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.
Posted: Sat Jan 22, 2005 10:49 pm
by shiznatix
is there any way to use cookies while using a iframe????
Posted: Sat Jan 22, 2005 11:02 pm
by feyd
shiznatix wrote:is there any way to use cookies while using a iframe????
yes. sadly the how can be very complicated.