October 25th, 1999, 11:54 AM
I'm trying to do something that's probably very simple, but I can't figure out what's wrong with it. Forest for the trees, and all that.
What I want to do is have each category page at http://www.exchangefaq.org have a "you were last here on" timestamp. I figured the way to do it was to put some code in the page before the <HEAD> element:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$pageLastVisitTime = $HTTP_COOKIE_VARS["LastVisit"];
setcookie("LastVisit", time(), time()+(3600*24*7), "/content/",
On the face of it this would seem to work OK: it gets the current cookie value, empties the LastVisit cookie, then sets it to "right now". (The two calls to setcookie() are in reverse order 'cause the PHP3 manual says to do it that way
Problem: this code always sets the LastVisit time to "right now". I want to preserve the _real_ last-visit time and use it. What esoteric (or stupid) feature or flag am I missing?