Advertisement
Guest User

Untitled

a guest
Feb 25th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. String ridy_username = kel_username.getText();
  2. String ridy_password = new String(kel_password.getPassword());
  3. JOptionPane.showMessageDialog(null, ridy_password);
  4. System.out.println(ridy_password);
  5. try{
  6. String query= " SELECT * FROM tb_login WHERE username='"+ridy_username+"' AND password='"+ridy_password+"'";
  7.  
  8. ResultSet ridy_rs = ridy_st.executeQuery(query);
  9. if(ridy_rs.next()){
  10. {
  11. JOptionPane.showMessageDialog(null, "Berhasil Login");
  12. }
  13. }else{
  14. JOptionPane.showMessageDialog(null, "Gagal Login");
  15. }
  16. } catch (Exception e) {
  17. JOptionPane.showMessageDialog(this, e.getMessage());
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement