I'm new to php. I've been reading the other thread but still can't figure out how to manage my session variable.
this is a part on my login.php on my website.
<?
$username=($HTTP_POST_VARS["username"]);
$password=($HTTP_POST_VARS["password"]);
$query="select* from members where username = '$username' and pass = '$password'";
$result=mysql_query($query);
if (!mysql_num_rows($result))
{
echo ' <br> you are using wrong username and password </br>';
exit;
}
session_register("valid_user");
$valid_user=$username;
?>
I have no problem yet. It's when I'm trying to access the session variable in another page with the following function :
$valid_user=$HTTP_SESSION_VARS["valid_user"];
it's empty. what exactly do I need in order to access to sessoin variable so I can carry my authentication process thru out the whole site. thanks again