Simple Password Protect Page
A 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']; ?>">
<label for="txtUsername">Username:</label>
<input type="text" title="Enter your Username" name="txtUsername" />
<label for="txtpassword">Password:</label>
<input type="password" title="Enter your password" name="txtPassword" />
<input type="submit" name="Submit" value="Login" />
</form>
<?php
}
else {
?>
This is the protected page. Your private content goes here.
<?php
}
?>
Faster REGEXP Search Faster MySql REGEXP LIKE Search
Movie Maker MP4 Movie Maker Import MP4 3GP
Movie Maker Profiles A selection of Movie Maker Profiles
Simple Password Protect Page A lite simple PHP password protect script
Develop
Projects
Wordpress