Re: [php-windows Digest Issue 259] Cookies

From: Date: Thu, 19 Oct 2000 22:00:17 +0000
Subject: Re: [php-windows Digest Issue 259] Cookies
Groups: php.windows 
Request: Send a blank email to php-windows+get-3391@lists.php.net to get a copy of this message
> Re: problem with cookies > 3377 by: Andy Hoffman > 3379 by: Andy Hoffman > 3380 by: Thomas Kryger To the one with the problem... I don't know if you run the cgi version, but my experience is that when using the ++ operator on a string, sometimes it doesn't get incremented... And the value of the cookie is treated as a string. (Could be some hidden bug, but don't know for shure...) Well, to see what is happening in your script, try this: <?php $cookiesimpleinc = $cookiesimple + 1; setcookie("cookiesimple", $cookiesimpleinc); $cookieadvinc = $cookieadv++; setcookie("cookieadv", $cookieadvinc, time()+10); echo "simple: in = $cookiesimple, out = $cookiesimpleinc<br>\n"; echo "adv: in = $cookieadv, out = $cookieadvinc<br>\nnow reload and see..."; ?> Good luck... Sjon. PS: If you use netscape, set the advanced option "warn me before accepting a cookie" to on. Might be usefull too... : ) ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1

« previous php.windows (#3391) next »