Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <form action="/checkUser.php" method="post" target="_blank">
- Username: <input type="text" name="username"><br>
- Password: <input type="text" name="password"><br>
- <input type="submit" value="Submit">
- </form>
- <p>Click on the submit button, and the input will be sent to a page on the server called "/action_page.php".</p>
- </body>
- </html>
- <?php
- $username = _POST("username");
- $password = _POST("password");
- $un = ["eliez","greatGuy","blogger"];
- $pw = ["tr789ial","abc123","23seventeen23"]
- for($x =0; $x < 3; $x++){
- if($username == $un[x] && $password == $pw[x])
- echo "You have sucessdully logged in!"
- else
- "Sorry, wrong information has been entered"!
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement