Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Connect {
- private final String USERNAME = "sousou";
- private final String PASSWORD = "ay";
- private final int PORT = 8000;
- private final String HOSTNAME = "localhost";
- public String getUsername(){
- return this.USERNAME;
- }
- public String getPassword(){
- return this.PASSWORD;
- }
- public boolean checkConnection(String username, String password) {
- Connection cnx= connecterBD();
- Statement st;
- ResultSet rst;
- st=cnx.createStatement();
- rst=st.executeQuery("SELECT * FROM utilisateur WHERE username='" + username + "' AND password'" + password + "'");
- if (rst.next()) {
- return true;
- }
- else {
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement