RE: [PHP] Can not get session value???
| From: | Johnson, Kirk | Date: | Wed, 03 Apr 2002 15:22:48 +0000 |
| Subject: | RE: [PHP] Can not get session value??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91315@lists.php.net to get a copy of this message | ||
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...