title: Java (Netbeans) - One Login Form with 2 different Home page depending on the type of access
body: <pre><code>  String sql1 = "select type from tbl_login where username='"+username.getText()+"' and password='"+password.getText()+"'";
              try {
                  pst = conn.prepareStatement(sql1);
                  rs = pst.executeQuery();
                      if (????????????????????) {
                          AdminHome ah = new AdminHome();
                          ah.setVisible(true);
                      }
                      else {
                          EmployeeHome eh = new EmployeeHome();
                          eh.setVisible(true);
                      }
              }
              catch (Exception e){
                  JOptionPane.showMessageDialog(null, e);
              }
      }
  
  ________________________________________________________________
  This is my tbl_login
  -----------------------------------------------
   id |   username   |   password   |   type   |
  -----------------------------------------------
    1 |   admin      |  admin       | admin    |
  -----------------------------------------------
    2 |  emp0002     |   emp0002    | employee |
  -----------------------------------------------
  ________________________________________________________________
  </code></pre>
  
  <p>***This is a part of my program this code should have an output that if the type of the useris admin, the JFrame2 should be shown, otherwise, jFrame3 should be shown.
  The "????" above is the location of my error. I'm a novice and I can't get the logic easily. Please help me.. thanks.</p>