Advertisement
Guest User

Untitled

a guest
Oct 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $_SESSION=array();
  4. if($_POST){
  5. $username=$_POST["username"];
  6. $password=$_POST["password"];
  7.  
  8. require_once "Database.php";
  9. $db = new maskapaiDB();
  10. $admin_id = $db->check_login($username,$password);
  11. if($admin_id > 0 ){
  12. //echo "<script>alert('Login Success !');</script>";
  13. $_SESSION['admin_login'] = $admin_id;
  14. echo "<script>window.location.href='admin.php'</script>";
  15. exit();
  16. }
  17. else{
  18. echo "<script>alert('Gagal');</script>";}
  19.  
  20.  
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement