Hi
I am handling a session variable in which i am registering the userid value while the user login.This registered variable should available where ever i open the different page.For that i am using this.
<?
session_start();
session_register("userid");
$userid="xxx";
?>
After authenticating the userid value i am doing the above and redirecting to page2 using header function.
<?
header("Location: page2.phtml");
?>
In page2 to check the registered session value i am doing like this.
<?
session_start();
print("user id ".$userid);
?>
But this value returns empty string.I don't know what is the problem.It is totally confusing.I am using PHP4.In my php.ini the register_global is enabled.But there is no entry for track_vars.But in php.ini it is mentioned that track_vars is enabled by default for php4.
If the above problem is solved then how to get the value from $HTTP_SESSION_VARS.
Expecting help for my problem.
Thanks in advance.
srini