At the top of every script that will register or use session
variables, I do "session_register" - something like this:

script_1.php
------------
 <?php
    session_start();
    session_register("test");
    $test = "myname";
 ?>

script_2.php
------------
 <?php
    session_start();
    echo "Value of \$test = $test"; // value should be "myname"
 ?>

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

Jacky [[EMAIL PROTECTED]] wrote:
> Hi all
> I have been to look at manual about session, in php4, still not quite get it.
> Basically if I have sniplet below in one page, how do I assign value into that 
>session and how do I call it up in next page? I sthe way I assign value into session 
>correct? ( I think it did not, because it did not work, but still need to show what I 
>did, so help can get to the right point easier).
> Note: that I simply hardcode value into session just to see if it will like it.
> *************************
> <?php
> session_register("test");
> $test = "myname";
> ?>
> *********************
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to