Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST["submit"])) {
- $validUser = $_POST["username"] == "admin" && $_POST["password"] == "password";
- if(!$validUser) { echo "Kredensial Salah"; }
- else { echo "$validuser"; }
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login</title>
- </head>
- <body>
- <form name="input" action="#" method="post">
- <label for="username">Username:</label><input type="text" value="<?= $_POST["username"] ?>" id="username" name="username" />
- <label for="password">Password:</label><input type="password" value="" id="password" name="password" />
- <input type="submit" value="Home" name="submit" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement