Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. $sth = $dbh->prepare("SELECT * FROM users WHERE user=:login AND pass=:haslo");
  2. $sth->bindParam(':login', $_POST['login']);
  3. $sth->bindParam(':haslo', $_POST['haslo']);
  4. $sth->execute();
  5. $data = $sth->fetchAll();
  6. $sth->closeCursor();
  7. $sth = null;
  8.  
  9. foreach($data as $result){
  10. echo $result;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement