Simple Password Protected Page
Monday, September 10th, 2007A simple PHP password protection script for a single page. Your visitors must enter a password and username into a form to view the content of the page. <?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']; ...
