Hi,
I am developing web with PHP 4.3.0 under win2k environment. I set register_globals = off.
Now I have two simple pages.
====Session.php=======
<?
$_SESSION["user_name"] = "michael" ;
if (isset($SESSION["user_name"]))
{
echo "User name:" . $SESSION["user_name"] ;
}
else
{
echo "User name not set." ;
}
?>
====Session2.php=======
<?
if (isset($SESSION["user_name"]))
{
echo "User name:" . $SESSION["user_name"] ;
}
else
{
echo "User name not set." ;
}
?>
I visit session.php, then session2.php.
I got "User name:michael" in session.php but "User name not set." in session2.php.
I expect the $_SESSION["user_name"] should be available in both pages...
What's the problem?
Thanks in advance.