title: How do I verify password entered is the password associated with entered email?
body: <p>Hey I am trying to verify the password matches the one they entered with the email I have been searching for the web for a few hours and everything else I have tried does not work this is what i have so far:</p>
  
  <pre><code>try {
      Class.forName(driver).newInstance();
      Connection conn = (Connection) DriverManager.getConnection
                        (url + dbName, userName, password);
      PreparedStatement checkUserInfo = (PreparedStatement) conn.prepareStatement
                                        ("SELECT password FROM profiles WHERE email = ?");
      checkUserInfo.setString(1, emailT);  //emailT is email pulled from an editText
      //checkUserInfo.setString(2, pass1);
      //Statement state =  (Statement) conn.createStatement();
      //String querychk = "SELECT * FROM profiles WHERE email = '"+emailT+"'";
      //ResultSet rs = state.executeQuery(querychk);
      ResultSet rs = checkUserInfo.executeQuery();
      while (rs.next()){
          String pass = rs.getString(2);
          if (pass.equals(pass1)) {
              return success;
          }
      }
      conn.close();
  }
  catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>