mqnoy

like this

Apr 20th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. session_start();
  3. require_once("config.php");
  4. $username = $_POST['username'];
  5. $pass = $_POST['password'];
  6. $cekuser = mysql_query("SELECT * FROM user WHERE username = '$username'");
  7. $jumlah = mysql_num_rows($cekuser);
  8. $hasil = mysql_fetch_array($cekuser);
  9. $h_user=$hasil['username'];
  10. $h_pass=$hasil['password'];
  11. $h_lvl=$hasil['level'];
  12. $h_blok=$hasil['blok'];
  13.  
  14. if ($h_pass==$pass)//jika hasil password sama
  15. {
  16. //maka user login
  17. if($h_user !=$username)//jika hasil username tidak sama
  18. {
  19. //user tidak tidak ada
  20. }
  21. else if($h_blok==="n")
  22. {
  23. //login user sukses
  24. }
  25. else if($h_blok==="y")
  26. {
  27. //user di blokir
  28. }
  29.  
  30. }
  31. else {}//pasword salah
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment