Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
417 B
3
Indexable
Never
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';
}
Leave a Comment