RE: [PHP] Re: Help with a trivial session example.

From: Date: Thu, 30 May 2002 23:45:45 +0000
Subject: RE: [PHP] Re: Help with a trivial session example.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100024@lists.php.net to get a copy of this message
> I can't say that I have moved over to the new superglobals > yet - I prefer register_globals cos I am lazy ;) Given $myvar = 5; If you use session_register('myvar'); Then on another page, do you just access it via $myvar? And if that's the case, isn't it the same to set $HTTP_SESSION_VARS['myvar'] = $myvar; Or even $GLOBALS['myvar'] = $myvar; Or $_SESSION['myvar'] = $myvar; Not that ANY of these are working for me *sigh* > But it does seem that there are two possible variables that > you need to use - the one in your script > ($HTTP_SESSION_VARS), but this is only for 4.0.6 or less, it > is $_SESSION otherwise - what version do you have installed? 4.0.6 according to the phpinfo link on the page ;-) > I made a very simple test page, and even that doesn't work: > > http://daevid.com/examples/index.phtml > > Notice how I have the right session_id, but the variable didn't pass > onto the second page. > > Can someone please explain to me what I am doing wrong? > Do I not have PHP.ini configured properly or something?

« previous php.general (#100024) next »