Advertisement
KrisnaAP

Untitled

Mar 28th, 2018
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.59 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4. $user = $_POST["inputEmail"];
  5. $pass = $_POST["inputpassword"];
  6. //=============================
  7. $dbuser = "admin@gmail.com"; //email bisa dirubah
  8. $dbpass = "admin"; //password bisa dirubah
  9. //=============================
  10. if ($user == $dbuser && $pass == $dbpass){
  11.     $_SESSION["gagal"] = 0;
  12.     echo '<h1><center>MENU UTAMA!</h1>';
  13.     echo "<center><a href='index.php'><button>LOG OUT</button></a>";
  14. }
  15.  else {
  16.     if (isset($_SESSION ["gagal"])) {
  17.         $_SESSION ["gagal"]++;
  18.     }
  19.  else {
  20.         $_SESSION ["gagal"] = 1;
  21.     }
  22.     header("location:index.php");
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement