Hi,
I am a newbie for PHP and using PHP-4.0.6 compiled with Apache and MySql.
Trying to code seessions in PHP.
session_start();
.......
if(PASSWORD CORRECT){
global $unumber;
$unumber = $row["unumber"];
session_register("unumber");
}
do_left_menu();
print "Unumber = .$unumber."<br>";
Unumber = XXX line prints correct value but inside do_left_menu() I can not.
do_left_menu()
{
if((session_registered("unumber")){
print "Unumber = $unumber";
}
}
prints NOTHING........though it is EXECUTING the print statement.
If I use $GLOBALS["unumber"] I get the correct value.
Where is the problem? Why can't I refer to the registered variable using $unumber? Why do I have to use GLOBALS array to refer to the registered variable?
PHP is compiled with -enable-track-vars option.
Thanks for all the HELP
Arvind Deshpande