点击注册按钮主要执行下面代码,可以把用户名和密码插入到数据库
String userName = request.getParameter("Username");
String password= request.getParameter("Password");
PreparedStatement pst;
String sql = "insert into admin values(?,?)";
PreparedStatement pst = conn.prepareStatement(sql);
pst.setString(1,userName);
pst.setString(2,password);
pst.executeUpdate();