Page 1 of 1

setting cookies

Posted: Thu Jan 25, 2001 11:11 am
by sabety
I'm setting a cookie like this:

<header COOKIE="MYSITE" VALUE=$user EXPIRES="+1 year">

and it is set succesfully

I later want to retrieve it like this:

<varinfo list COOKIE>
<getvar $ret>
<$user = $ret>

and it is not working. First time with cookies, having a bit of a time...

setting cookies

Posted: Thu Jan 25, 2001 11:43 am
by John
You should be able to retrieve it by looking at $MYSITE directly since that is the name of the cookie. Note that <varinfo> may return a list of cookies if more than one is set, which may be the problem.

setting cookies

Posted: Fri Jan 26, 2001 4:03 am
by sabety
I just replaced $ret with MYSITE and it is getting the right cookie!

Thanks!