- TS TS
- #21
paps ano mali dito sa code ko?
Code:
<?php
if (isset($_POST['submit'])) {
if (!isset($_SESSION['attempts'])) {
$_SESSION['attempts'] = 0;
}
if ($_SESSION['attempts'] == 3) {
echo "SORRY WRONG Password, GOODBYE!";
}else{
$pass = $_POST['pass'];
if (strtolower($pass) == 'admin') {
echo "HELLO MY NAME IS KRISTAN MARKO CRISOSTOMO, I'M THE PROGRAMMER";
}else{
$_SESSION['attempts']++;
$reattempt =3 - $_SESSION['attempts'];
echo "Wrong Password, number of attempts left: ".$reattempt;
}
}
}
?>