Simple PHP Question

Out of context: Reply #10

  • Started
  • Last post
  • 31 Responses
  • ********
    0

    <?php
    //password
    $pw = 'sekritz';

    if ($_POST['submit'] == 'Login')
    {
    //Check Password
    if ($_POST['password'] == $pw)
    //Send to Sekritz
    header('Location: sekritz.php');
    else
    //load error note and proceed with the rest of the shit.
    $error = 'Password Incorrect<p>';
    }
    ?>

    <form method="post" action="<?=$PHP_SELF;?>" name="sekrit">
    <?=$error;?>
    Please enter the password.
    <p><input type="text" name="password">
    <input type="submit" name="submit" value="Login">
    </form>

    • how would I modify the header(Location with a direct link rather than a local link?epikore

View thread