document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. include(\'koneksi.php\');
  3. $username = $_POST[\'username\'];
  4. $password = $_POST[\'password\'];
  5. $query = mysql_query("SELECT * FROM login WHERE username = \'$username\' AND password = \'$password\' ");
  6. $cek = mysql_num_rows($query);
  7. if($cek == 0) {
  8.     echo "<script>alert(\'Login gagal, periksa username dan password anda\');location=\'index.php\'</script>";
  9. }else{
  10.     $row = mysql_fetch_assoc($query);
  11.     session_start();
  12.     $_SESSION[\'username\'] = $row[\'username\'];
  13.    
  14.     echo "<script>alert(\'Login berhasil\');location=\'home.php\'</script>";
  15. }
  16. ?>
');