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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to