Re: Cookie lifetime (starting n ending)

From: Date: Thu, 16 Nov 2000 06:40:09 +0000
Subject: Re: Cookie lifetime (starting n ending)
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3887@lists.php.net to get a copy of this message
Try this... <? $blah++; setcookie("blah", $blah, time()+9999999); ?> <html> <p>you have visited <? echo $blah; ?> times</p> Cheers, -mic ----- Original Message ----- From: "Satish Alwani" <assid@assid.com> To: <php-windows@lists.php.net> Sent: Thursday, November 16, 2000 5:26 PM Subject: [PHP-WIN] Cookie lifetime (starting n ending) > if my code is something like this > > <? > if (!isset($blah) { > setcookie("blah","2",mktime(0,0,0,01,01,2001); > } else { > $blah+=1 > } > ?> > <html> > .... > ... > ... > <? > echo "you have visited $blah times"; > ?> > > this code doesnt increment $blah > any idea why ??? > is it because i put an html code in the middle ? > also sometimes when i do something on top... run some html in the middle and again do some php code... it doesnt retain the values to the bottom half. > > Thanks > satish > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#3887) next »