-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup_usingjsp.jsp
35 lines (29 loc) · 1.13 KB
/
signup_usingjsp.jsp
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
30
31
32
33
34
35
<%@page import="java.sql.*" %>
<html>
<head>
<title>JSP Page</title>
</head>
<body>
<%
String mail = request.getParameter("email");
String pass = request.getParameter("password");
String name = request.getParameter("name");
String sq = request.getParameter("securityQuestion");
String ans = request.getParameter("answer");
String cont = request.getParameter("contactNo");
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","manager");
Statement stmt = con.createStatement();
String q1 ="insert into e_reg1 values('"+mail+"','"+pass+"','"+name+"','"+sq+"','"+ans+"','"+cont+"')";
int x=stmt.executeUpdate(q1);
if(x>0){
out.println("insert success");
}
}
catch(Exception e){
out.println("insert unsuccess");
}
%>
</body>
</html>