SHARE
TWEET

Untitled

a guest Jun 16th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $email=mysqli_real_escape_string($con,(strip_tags($_POST["email"],ENT_QUOTES)));
  2. $password=mysqli_real_escape_string($con,(strip_tags($_POST["password"],ENT_QUOTES)));
  3.  
  4.  
  5. $query = mysqli_query($con,"SELECT * FROM user WHERE email ='$email' AND password = '$password'");
  6. $username = "admin";
  7.  
  8.     if ($row = mysqli_fetch_array($query,$username)) {
  9.  
  10.  
  11.             $_SESSION['user_id'] = $row['id'];
  12.             header("location: ../dashboard.php");
  13.      
  14. id                 Primaria  int(15)
  15. username                     varchar(50)
  16. name                         varchar(50)
  17. email                        varchar(50)
  18. password                     varchar(50)
  19. profile_pic                  varchar(50)
  20. is_active                    tinyint(4)
  21. kind                         int(15)
  22. created_at
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