$password = "1234"; // Here is the password
$p = "";
if(isset($_COOKIE["isview"]) and $_COOKIE["isview"] == $password){
$isview = true;
}else{
if(isset($_POST["pwd"])){
if($_POST["pwd"] == $password){
setcookie("isview",$_POST["pwd" ],time()+3600*3);
$isview = true;
}else{
$p = (empty($_POST["pwd"])) ? "A password is required to view, Please enter the password. " : "The password is incorrect, please re-enter ";
}
}else{
$isview = false;
$p = "Please enter the password to view it. You can get the password. Contact me. ";
}
}
if($isview){ ?>
This is where the password will be displayed after the password is successful
Script House reminds you to enter your password } ?>