 |
| ::: T4VN Statistics ::: |
PHP Scripts : 51
|
PHP Example : 67
|
PHP Tutorials : 21
|
PHP News : 93
|
Total Coupon : 36
|
Other Tutorials :
|
Member : 182
|
Visitor Online : 4
|
Today Visit: 350
|
Total Visitor : 134071
|
Most Online : 31
|
|
|
 |
Easy Simple Password Protector
Author : Andrew Danks
Need a simple protection to a file that requires a password? Here's one! Contact me if you need help!
| PHP Example : |
|
<?
/*
Code Written by Andrew Danks
www.solinweb.net
*/
//The password form field must be named "password".
//Casing matters! i.e. ThiS isn't the same as this
$thepassword="password";
//Message when user doesn't enter a password
$nopw="You didn't enter a password knucklehead!";
//Success page when password is correct
$success="success.php";
//Message when Uuser enters wrong password
$wrongpw="Wrong Password!";
//DO NOT EDIT BELOW UNLESS YOU ARE FAMILIAR
//WITH PHP!!!!
//-------------------------------------------------------------------------------
if(!$password){
echo $nopw;
exit();
}
if($password==$thepassword) {
Header("Location: $success");
}
else {
echo $wrongpw;
}
?>
|
|
|
|

|
 |
| ::: Resources ::: |
|
|
| ::: New Templates ::: |
|
| ::: Other Tutorials ::: |
|
|