public function login() { $this->user = new admins(); $login = SANATIZE::escape($_POST['name']); $password = SANATIZE::escape($_POST['password']); $login = $this->user->login($login, $password); return $login; }
public static function get($item) { if (isset($_POST[$item])) { return SANATIZE::escape($_POST[$item]); } else { if (isset($_GET[$item])) { return SANATIZE::escape($_GET[$item]); } } return null; }
public function process() { $this->user = new Users(); $remember = false; if (isset($_POST['remember']) && $_POST['remember'] == 'on') { $remember = true; } $login = SANATIZE::escape($_POST['log-id']); $password = SANATIZE::escape($_POST['log-password']); $login = $this->user->login($login, $password, $remember); return $login; }