Here is a simple login script I found ...I am not an expert in PHP (yet)...I do not have any idea how to add an error message, when one enters the wrong pasword, but this script is very easy and simple...though might not be the most secure....it will keep the average looker out

Works for Mozilla& IE
PHP Code:
<?php
// Define your username and password
$username = "someuser";
$password = "somepassword";
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
?>
<h1>Login</h1>
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label for="txtUsername">Username:</label>
<input type="text" title="Enter your Username" name="txtUsername" /></p>
<label for="txtpassword">Password:</label>
<input type="password" title="Enter your password" name="txtPassword" /></p>
<input type="submit" name="Submit" value="Login" /></p>
</form>
<?php
}
else {
?>
This is the protected page. Your private content goes here.</p>
<?php
}
?>
Source: TotallyPHP (
http://www.totallyphp.co.uk)