Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $username = $_POST['username_login'];
  2. $password = $_POST['password_login'];
  3. $fields = 'cust_id, cust_fname, cust_lname, cust_password';
  4. $sql = "select $fields from customers where cust_username = ";
  5.  
  6. if (user_exists($username))
  7. {
  8. $sql .= "'" . $username . "'";
  9. $results = $db_conn->query($sql) or die($db_conn->error);
  10. $results = $results->fetch_assoc();
  11. $hash = $results['cust_password'];
  12.  
  13. if (password_verify($password, $hash))
  14. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement