Is the data being transmitted correctly in this function? Is another screening method possible? bindparam does not work for $ DBH-> query
public function CheckAuth($email, $password) { $DBH = Registry::get('DBH'); try { $email = $DBH->quote($email); $password = $DBH->quote($password); $STH = $DBH->query("SELECT id FROM user WHERE mail=$email AND password =$password"); $result = $STH->setFetchMode(PDO::FETCH_ASSOC); while ($row = $STH->fetch()) { return $row['id']; } } catch (PDOException $e) { print $e->getMessage(); } }