Re: getting session data

From: Date: Fri, 26 Apr 2002 19:57:57 +0000
Subject: Re: getting session data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94813@lists.php.net to get a copy of this message
You forgot to do a session_start() in your a.php script. Also make sure register_globals is turned on. If it isn't, use $_SESSION['userip'] in b.php. -Rasmus On Fri, 26 Apr 2002, Deval Parikh wrote: > hi, > IF I am using this code in one script... > > a.php > --------- > <?php > > $userip = $REMOTE_ADDR; > session_name("sessiontest"); > session_register("userip"); > > ?> > > so how can i use above session data in another > script...like this way..??? > > b.php > --------- > <?php > session_start(); > echo $userip; > ?> > > I can not got the result..please correct me. > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Games - play chess, backgammon, pool and more > http://games.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#94813) next »