I put session_start() in every page.
login.php post username and pwd to first.php.
first.php assign these values into session variable.
second.php extract session variables. At that time, these variables are null although session id exists.
first.php ................
if(session_id())
{
echo session_id(); // display session id
session_register ("username");
session_register ("pwd");
$SESSION['username'] = $username;
$SESSION['pwd'] = $pwd;
echo $SESSION['username']; // display username
echo $SESSION[pwd]; // display pwd
}
second.php
if(session_id())
{
echo session_id(); // display session id
$username = $SESSION['username'];
$pwd = $SESSION['pwd'];
echo "username is ..$username"; // blank
}
Is there any missing point in my page ?? Help me please.