Alright, this is a bit simplified and such but here goes
Hopefully you have PHP running on your server and such.
PHP Code:
<?
op_start();
print '<head>
<title>My spectacular page</title>
</head>
<body>
<h1>Login Form</h1>
if ( isset ($_POST['submit'])) {
//Handles the form
if ( !empty ($_POST['username'])) && ($_POST['password'])) ) {
if ( ($_POST['username'] == 'testing') && ($_POST['password'] == 'testpass') ) {
//Everything is good
header('Location: welcome.php');
exit();
} else { //Password was wrong
print '<p>The submitted username and password do not match those on file<br>Go back and try again.</p>';
}
} else { //Forgot something
print '<p>Please make sure you enter both a username and a password!<br> Go back and try again.</p>';
}
} else { //If form wasn't submitted
//Displaying the form
print '<form action="login.php" method="post"><p>
Username:<input type="text" name="username" size="20"><br>
Password: <input type="password" name="password" size="20"><br>
<input type="submit" name="submit" value="Log In"></p>
</form>';
}
print '</body></html>';
ob_end_flust();
?>
Hopefully this all works, might be a few typos somewhere, I'll look when I get out of work.