Advertisement
likeadream

Untitled

Aug 20th, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. include 'inc/koneksi.php';
  3. session_start();
  4.  
  5. $username = $_POST['username'];
  6. $password = $_POST['password'];
  7.  
  8. $query = mysql_query("select * from member where username='$username' and password='$password'");
  9. $cek = mysql_num_rows($query);
  10. echo $cek;
  11.  
  12.  
  13. if($cek > 0){
  14. $_SESSION['username'] = $username;
  15. $_SESSION['status'] = 'submit';
  16. header("location:member/index.php");
  17. }else{
  18. header("location:loginmember.php?message=gagallogin");
  19. }
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement