Contoh Login Proses.php

  1. <?php
  2. $user=$_POST['user'];
  3. $pswd=$_POST['password'];
  4.  
  5. //di baca variabel user sama dengan variabel pos user
  6.  
  7. //echo "$user";
  8. //echo $password;
  9.  
  10. if(($user=="lukman")&&($pswd=="oke")){
  11.  
  12. echo "passwod dan username <b>cocok</b> bisa di lanjutkan";
  13. //header("location:admin.php");
  14. echo "<script>window.location.href='admin.php';</script>";
  15.  
  16. }
  17. else{
  18.  
  19. echo "password atau username <b>salah</b> silahkan ulangi lagi ";
  20. echo "<script>window.location.href='login.php?status=gagal';</script>";
  21. }
  22. ?>

Leave a Comment