Make a file with 2 variables like the following
Protect.php
PHP Code:
<?php
$USER_LOGIN = 'usernamehere';
$USER_PASS = 'md5encryptedpw';
?>
Then for the login make it see if it's correct
PHP Code:
<?php
// Form process code above
$FORM_LOGIN = $_POST['login'];
$FORM_PASS = md5($_POST['password']);
// Checks to see if the submitted data from the form matches with set login info
if( $FORM_LOGIN == $USER_LOGIN && $FORM_PASS == $USER_PASS ) {
// If it has the combination has been successful echo, redirect, or what you to do here
} else {
// If the combination failed then do whatever you want (e.g. Dispaly an error message)
}
?>
That is very basic....you can also do it with a database and you can include cookies and such. Hope that helped