Advertisement
Guest User

login

a guest
Feb 28th, 2018
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. if(isset($_POST["submit"])) {
  3.   $validUser = $_POST["username"] == "admin" && $_POST["password"] == "password";
  4.   if(!$validUser) { echo "Kredensial Salah"; }
  5.   else { echo "$validuser"; }
  6. }
  7. ?>
  8.  
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12.   <title>Login</title>
  13. </head>
  14. <body>
  15.   <form name="input" action="#" method="post">
  16.     <label for="username">Username:</label><input type="text" value="<?= $_POST["username"] ?>" id="username" name="username" />
  17.     <label for="password">Password:</label><input type="password" value="" id="password" name="password" />
  18.     <input type="submit" value="Home" name="submit" />
  19.   </form>
  20. </body>
  21. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement