Re: Can not get session value???

From: Date: Wed, 03 Apr 2002 15:40:18 +0000
Subject: Re: Can not get session value???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91320@lists.php.net to get a copy of this message
Yes, you have to call session_start() on every page you want to access/pass session variables Eric ----- Original Message ----- From: "Johnson, Kirk" <kjohnson@zootweb.com> To: <php-general@lists.php.net> Sent: Wednesday, April 03, 2002 10:22 AM Subject: RE: [PHP] Can not get session value??? > Do you have a call to session_start() in the second file? You need this to > access the session variables on the second page. > > Kirk > > > -----Original Message----- > > From: N.D. Andini [mailto:dini@seilink.com] > > Sent: Tuesday, April 02, 2002 3:20 AM > > To: php-general@lists.php.net > > Subject: [PHP] Can not get session value??? > > > > > > I use php4.0.5, OS : WIN2000, Webserver : Apache > > > > I want to use session to make global variable > > in file php.ini..... > > I have set item below become enabled > > - register_globals > > - auto_start > > - use_trans_sid (to compiled with --enable-trans-sid) > > > > in my first file myfirst.php, I register session like below : > > session_register ("ses_useid"); > > session_register ("ses_usename"); > > $ses_useid="4"; > > $ses_usename="toto"; > > > > and on second file mysecond.php, I get value of those session to check > > session value like below: > > print $ses_useid; > > print $ses_usename; > > > > but I have no result from mysecond.php > > > > Is there anybody can help me??? > > > > thx > > > > regards, > > > > Dini... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#91320) next »