function isLogged($UserName, $PassWord, $LogInPage)
{
//Without this, PHP will create a local
//variable called $HTTP_COOKIE_VARS.
global $HTTP_COOKIE_VARS;
$Entered_UserName = "";
$Entered_PassWord = "";
if(isset($HTTP_COOKIE_VARS["UserName"]) &&
isset($HTTP_COOKIE_VARS["PassWord"]))
{
$Entered_UserName = $HTTP_COOKIE_VARS["UserName"];
$Entered_PassWord = $HTTP_COOKIE_VARS["PassWord"];
}
if($Entered_UserName != $UserName || $Entered_PassWord != $PassWord)
{
//$LogInPage should be the name of an existing file
//with alternative web content. If you don't wish to
//provide such content, just pass the empty string.
if($LogInPage != "") include($LogInPage);
return(false);
}
else
return(true);
}
?>
Edit your Profile [If registered and possibly logged in.]
|