Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ming? what? did I post funny? This is the first post I think I ever made on a board that was not my own… If I goofed, then sorry…if not and someone wants to email post to different categories (using the email post setup), I also did that.. a little modification to the mail php..

    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..

    Well, other than using sessions or cookies, you might tell grandma to go to https://myurl/wordpress/index.php?password=password, then in the index have it read the password and show nothing if it is not correct… then hide it somewhere on the page so it will be passed each page reload etc…I normally have a log in page with a session set, then check for that session each page load, but thats a little too complicated for this instance I think..
    most web sites will read the index.html first then the index.php, so you might make the index.html with javascript and tell grandma to click on pix one, then pix 5, then open the index.php.. ??? chances of a stranger or spider clicking on those two images in that order might be pretty low.

Viewing 3 replies - 1 through 3 (of 3 total)