Untitled

 avatar
unknown
plain_text
a year ago
417 B
6
Indexable
if (isset($_POST['password'])) {
    setcookie('hash', md5($_POST['password']));
    header("Refresh: 0");
    exit;
}
$password = '0e83658420563884129102433';
if (!isset($_COOKIE['hash'])) {
    echo '<form><input type="password" name="password" />'
    . '<input type="submit" value="Login"></form>';
    exit;
} elseif (md5($_COOKIE['hash']) == $password) {
    echo 'Login ok';
} else {
    echo 'Login failed';
}
Editor is loading...
Leave a Comment