Guest User

Untitled

a guest
Jun 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. class Profile
  3. {
  4. var $My_Profile = false;
  5. var $db;
  6. function __construct($db)
  7. {
  8. $this->db=$db;
  9. }
  10.  
  11. function auth($form)
  12. {
  13. if((strlen($form['auth']['login']) AND strlen($form['auth']['password'])))
  14. {
  15. $login = htmlspecialchars(db::validString($form['auth']['login']));
  16. $password = md5($form['auth']['password']);
  17.  
  18. $query = "users` WHERE `login` = '$login' AND `password` = '$password' LIMIT 1";
  19. $select = "`login`,`password`";
  20.  
  21. $this->db->query($query,$select);
  22. }
  23. }
  24. }
  25.  
  26. ?>
Add Comment
Please, Sign In to add comment