Advertisement
Guest User

login.php

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