PHP – make webpage password protected
This trick helps you protect your web page with a help of a password...Here is the code:
$username = “someuser”;
$password = “somepassword”;
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {?>
Login
} else {?>
This is the protected page. Your private content goes here.
}?>