Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = readline();
- $usernameRev = strrev($username);
- $incorrect = 0;
- while (true){
- $password = readline();
- if ($password == $usernameRev){
- echo "User $username logged in.\n";
- break;
- }else {
- echo "Incorrect password. Try again.\n";
- $incorrect++;
- }
- if ($incorrect == 4){
- echo "User $username blocked!\n";
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement