User ". $_SESSION['name'] ." has left the chat session.
";
file_put_contents("log.html", $logout_message, FILE_APPEND | LOCK_EX);
session_destroy();
header("Location: index.php"); //Redirect the user
}
if(isset($_POST['enter'])){
if($_POST['name'] == "Mummy"){
$_SESSION['name'] = stripslashes(htmlspecialchars($_POST['name']));
}
else{
echo 'Incorrect password';
}
}
if(isset($_POST['character'])){
$_SESSION['name'] = stripslashes(htmlspecialchars($_POST['character']));
}
function loginForm(){
echo
'';
}
?>
D&D