Re: cookie stopped working???

From: Date: Sun, 14 Jan 2001 00:05:05 +0000
Subject: Re: cookie stopped working???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34424@lists.php.net to get a copy of this message
> I left the php list a few years ago when I lost the clients who wanted > (could afford) php scripts (I'm still using 2.12b..lol). Several > scripts are still running well after all these years. You probably should consider upgrading... > Now, I'm building an online programming resume for myself and using > php/msql to track potential employers as they visit. I'm using a cookie > to set a visitor id, then I read the cookie on each page and make > database updates to track page/timeonpage visiting sequence. And switch to MySQL while you're at it. mSQL is not much maintained, last I heard. You'll probably be able to do a global search&replace of msql_ for mysql_ and you're done. > Here is the set cookie from the new db record visitor script: > > $vin is a random 6 character string calculated before the set cookie > > SetCookie("cpvin","$vin","time()+1500"); "time()+1500" is pretty much going to end up being 0 by the time it gets to the cookie -- So you were using session cookies all this time, and they died as soon as you quit your browser. You want time()+1500 without the quotes -- It's a calculation, not a string. Also, the quotes on $vin are gratuitous -- They don't really hurt anything, but they're pretty pointless. > I also tried: > SetCookie("cpvin","$vin","Monday, 31-12-01 23:59:59 GMT"); (this > is what > I was using when it worked, then stopped) I reckon those might have worked until the New Year, if you got all the characters right...

« previous php.general (#34424) next »