Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Profile
- {
- var $My_Profile = false;
- var $db;
- function __construct($db)
- {
- $this->db=$db;
- }
- function auth($form)
- {
- if((strlen($form['auth']['login']) AND strlen($form['auth']['password'])))
- {
- $login = htmlspecialchars(db::validString($form['auth']['login']));
- $password = md5($form['auth']['password']);
- $query = "users` WHERE `login` = '$login' AND `password` = '$password' LIMIT 1";
- $select = "`login`,`password`";
- $this->db->query($query,$select);
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment