SHARE
TWEET

Untitled

a guest Jun 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (isset($_POST['login'])) {
  2.     $username = anti_injection($_POST['username']);
  3.     $password = anti_injection(md5($_POST['password']));
  4.  
  5.     // menghindari sql injection
  6.     $injeksi_username = mysqli_real_escape_string($conn, $username);
  7.     $injeksi_password = mysqli_real_escape_string($conn, $password);
  8.  
  9.     if (!ctype_alnum($injeksi_username) OR !ctype_alnum($injeksi_password)){
  10.         header("Location:".base_url()."/404");
  11.     }else{
  12.         $query  = "SELECT * FROM users WHERE username='$username' AND password='$password'";
  13.         $login  = $conn->query($query);
  14.         $verify = $login->num_rows;
  15.     $v      = $login->fetch_array();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top