Yes, you have to call session_start() on every page you want to access/pass session variables
Eric ----- Original Message ----- From: "Johnson, Kirk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]] > > Sent: Tuesday, April 02, 2002 3:20 AM > > To: [EMAIL PROTECTED] > > 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 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php