Login form in mysql
Clash Royale CLAN TAG #URR8PPP Login form in mysql I am using Mysql netbeans . I have created a db table "userdetails_summertrainingproject" . In the login form I have two fileds to fill one is "UUId_JTextField" and other is "Password1_JPasswordField". I want to compare that the password value entered by the user is same as that in db for the particular UUId entered by the user. UUid is unique. try{ Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root",""); String query = "SELECT password FROM userdetails_summertrainingproject WHERE UUId=?;"; PreparedStatement preparedStatement = conn.prepareStatement(query); preparedStatement.setString(1,UUId_JTextField.getText()); ResultSet rs = preparedStatement.executeQuery(); ...