Re: Sessions just don't work on my machine. (Trying this ag ain)

From: Date: Mon, 24 Sep 2001 17:18:18 +0000
Subject: Re: Sessions just don't work on my machine. (Trying this ag ain)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68571@lists.php.net to get a copy of this message
On 9/24/2001 1:15 PM this was written: > OK, now the session ID is getting passed like it should. Now for the two > missing variables. Try moving the two assignment statements ahead of the two > session_register() calls - "assign, then register". I have never seen this > make a difference, but the pros on this list say that is the way it needs to > be done. Done, I switched the four lines around. <? error_reporting(E_ALL); session_start(); $var1 = "My var 1"; $var2 = "My var 2"; session_register("var1"); session_register("var2"); ?><HTML> <HEAD> <TITLE>Session Page 1</TITLE> </HEAD> <BODY BGCOLOR=#FFFFFF> PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR> <FORM ACTION="index2.php" METHOD="POST"> Passing sessid: <INPUT TYPE=TEXT VALUE="<? echo $PHPSESSID; ?>" SIZE=40 NAME="PHPSESSID"><BR> VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT TYPE=SUBMIT VALUE="go"><BR> </FORM> <BR> <A HREF="index2.php?<?=SID?>">Try this link</A> </BODY> </HTML> -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#68571) next »