I must have been asleep when I posted above, wordpress does not interact well with passing variables, so I did this and it seems to work:
put this in the beginning of the index.php, right after the php tag:
$pass= $HTTP_COOKIE_VARS['pass'];
if(md5($pass) !="6ac2ef13799089e8322ab4d07833321f") {
header("Location: mylogin.php");
}
you do not have to hash it, you could use a plain password, just send them to mylogin.php if they don't have that cookie.
then in mylogin.php, put this:
<?php
if($submit) {
$set = SetCookie("pass","$pass", time()+(60*60*24*365),"/","yourdomain");
header("Location: index.php");
}
print<<<END
<form method=post action="mylogin.php">
Password: <input type="password" name="pass" value="" size=10 maxlength=10>
<input type="submit" name="submit" value="Enter">
</form>
END
?>
if they enter the wrong password, it will be rejected by the index and sent right back.. if the correct password is set, then grandma can come back for a year and not have to worry about the password.. you could also reset the cookie if they have the right password already and keep on going..