-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathUserImp.java
More file actions
29 lines (20 loc) · 754 Bytes
/
UserImp.java
File metadata and controls
29 lines (20 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//Ishan
import java.sql.*;
public class UserImp{
Connection connection;
Statement statement;
public void RegisUser(User user) throws ClassNotFoundException, SQLException{
String name= user.getName();
String username=user.getUsername();
String mobile=user.getMobile();
String email=user.getEmail();
String country=user.getcountry();
String password=user.getPassword();
String cpassword=user.getcPassword();
connection = DBconnection.getDBConnection();
connection.setAutoCommit(false);
statement = connection.createStatement();
String addUser="INSERT INTO `users` VALUES('"+name+"','"+username+"','"+mobile+"','"+email+"','"+country+"','"+password+"','"+cpassword+"')";
statement.executeUpdate(addUser);
}
}