note 16481 rejected from ref.session by zak

From: Date: Thu, 01 Nov 2001 12:17:25 +0000
Subject: note 16481 rejected from ref.session by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19975@lists.php.net to get a copy of this message
Why in these 3 linked page the var "count" does not go through the page if I have the browser sessions disabled??? Where is the mistake? I see the session_id, changing at every page! Someone can help me? Many thank Alessandro Bossi --------------------------------- <?php /* First.php */ session_name(mysession); session_start(); session_register ("count"); if (isset($submit)){ header("Location: Seconda.php?".SID); }else{ $count++; } print "session_encode=>> ".session_encode()."<BR>"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE> First Page</TITLE></HEAD> <BODY BGCOLOR="#A2BBAF"> <H4>First Page</H4> Hello visitor, you have seen this page <?=$count; ?> times.<p> count = <?= $HTTP_SESSION_VARS["count"] ?><BR> <P> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>"> <INPUT TYPE="hidden" NAME="count" value="<?=$count?>"> <INPUT TYPE="submit" name=submit value="Go to the SECOND page"> </FORM> </BODY></HTML> --------------------------------- <?php /* Second.php */ session_name(mysession); session_start(); session_register('count'); if (isset($submit)){ header("Location: Third.php?".SID); } print "session_encode=>> ".session_encode()."<BR>"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Second Page</TITLE></HEAD> <BODY BGCOLOR="#A2BBAF"> <H4>Second Page</H4> Hello visitor, you have seen this page <?=$count; ?> times.<p> count = <?= $HTTP_SESSION_VARS["count"] ?> <P> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>"> <INPUT TYPE="submit" name=submit value="Go to the THIRD Page "> </FORM> </BODY> </HTML> --------------------------------- <?php /* Third.php */ session_name(mysession); session_start(); session_register ("count"); if (isset($submit)){ header("Location: First.php?".SID); } print "session_encode=>> ".session_encode()."<BR>"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Third Page</TITLE> </HEAD> <BODY BGCOLOR="#A2BBAF"> <H4>Third Page</H4> Hello visitor, you have seen this page <?=$count; ?> times.<p> Count = <?= $HTTP_SESSION_VARS["count"] ?> <P> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>"> <INPUT TYPE="submit" name=submit value="Go to the FIRST Page "> </FORM> </BODY> </HTML>

« previous php.notes (#19975) next »