Refreshing session variables

From: Date: Thu, 18 Jul 2002 21:36:11 +0000
Subject: Refreshing session variables
Groups: php.general 
Request: Send a blank email to php-general+get-108340@lists.php.net to get a copy of this message
Hi guys, I got a problem with refreshing session variables. When the following code is run , for the first time both $z and $secretstring are showing same values. But when page is refreshed, the $secretstring variable is still having the old value no matter how many times I click refresh. Am I missing some thing ? <? $x = mt_rand (1000,10000); $y = mt_rand (1000,10000); $text = $x.$y; $secretstring =$x.$y; session_start(); if(session_is_registered("secretstring")){ session_unregister("secretstring"); } session_register("secretstring"); echo "<BR>".$text; echo "<BR>".$secretstring; ?>

« previous php.general (#108340) next »