<?php
session_start();

if ($_SERVER['REQUEST_METHOD'] == "POST") {
    $login_name = $_POST['login_name'];
    echo("<h3>Hello $login_name</h3>");
    $_SESSION['user'] = $login_name;
}

?>

<form method="POST">
    Login Name:
    <input type="text" name="login_name">
    Password:
    <input type="text" name="password">
    <input type="submit" value="Log In">
</form>