0
     String sql;
     sql = "select * from login where username = ? and password = ?";
     conn=MySqlConnect.ConnectDB();
     try
     {
        pst = conn.prepareStatement(sql);
        pst.setString(1, txtusername.getText());
        pst.setString(2, txtpassword.getText());
        rs = pst.executeQuery();
        if (rs.next())
        {

            JOptionPane.showMessageDialog(null, "Username and Password correct");


enter code here

when i tend to change getText() it throws an error while building

Parthiban
  • 1
  • 1

0 Answers0