Page 1 of 1

Re: Calling a cookie

Posted: Sun Aug 21, 2011 11:59 am
by twinedev
Say the cookie contains the timestamp of your visit, so your script could say "You were last here at 5:45pm on August 8, 2011".

You need to read the old value and either store it to another variable or use it right away before somewhere in your script you change its value to be the current time stamp.

If you did it in reverse order, your script would always list your last visit at the time you hit it because you set it to now before reading it.

-Greg

Re: Calling a cookie

Posted: Sun Aug 21, 2011 12:08 pm
by phphelpme
Yeah, basically you will overwrite your existing variable stored in your cookie if you do it the wrong way around.

Best wishes