first define somewhere the password and login you are going to test against, for example using define()d constants or use your own system (like database comparation)
define('APP_LOGIN', 'peter');
define('APP_PASSWORD', 'abcdefg');
and then test login.php:
if($_POST['submit']){
// login form has been submited
if($_POST['login'] == APP_LOGIN &&
$_POST['password'] == APP_LOGIN){
// user logged in correctly
// use header() to process to another page
die();
}else{
print('Wrong password and/or username');
}
}
?>
<form method="POST">
<input type="text" name="login"><br />
<input type="password" name="password"><br />
<input type="submit" name="submit" value="Log in..." />
</form>
<?php