Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class Login {
  2. public function log_in($username, $password) {
  3. include 'connection.php';
  4. $stmt = $pdo->prepare("SELECT * FROM members where username = ?");
  5. $stmt->execute([$_POST['username']]);
  6. $result = $stmt->fetch();
  7. $yourpassword = $result['password'];
  8. echo $yourpassword . "</br>";
  9. if(password_verify($password, $yourpassword)){
  10. echo "yep" . "</br>";
  11. } else {
  12. echo "nope" . "</br>";
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement