-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsave1.jsp
More file actions
40 lines (38 loc) · 1.92 KB
/
Copy pathsave1.jsp
File metadata and controls
40 lines (38 loc) · 1.92 KB
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
36
37
38
39
40
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*"%>
<%-- <%@page import="org.apache.taglibs.standard.tag.common.fmt.SetBundleSupport"%>--%>
<%
try {
System.out.print(request.getParameter("name"));
String id = request.getParameter("id");
out.println(id);
String name = request.getParameter("name");
String course = request.getParameter("course");
String mobile = request.getParameter("mobile");
String fathername = request.getParameter("fathername");
String mothername = request.getParameter("mothername");
String qualification = request.getParameter("qualification");
String dateofbirth = request.getParameter("dateofbirth");
String dateofjoining = request.getParameter("dateofjoining");
String feesub = request.getParameter("feesub");
String paid = request.getParameter("paid");
String fee = request.getParameter("fee");
String balance = request.getParameter("balance");
String address = request.getParameter("address");
String description = request.getParameter("description");
String trainer = request.getParameter("trainer");
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "shonu123");
PreparedStatement ps = con.prepareStatement("update student set name='" + name + "',course='" + course
+ "',mobile='" + mobile + "',address='" + address + "',trainer='" + trainer + "',description='"
+ description + "',dateofbirth='" + dateofbirth + "',dateofjoining='" + dateofjoining
+ "',qualification='" + qualification + "',feesub='" + feesub + "',fee='" + fee + "',paid='"
+ paid + "',balance='" + balance + "',fathername='" + fathername + "',mothername='" + mothername
+ "' where id= '" + id + "'");
int s = ps.executeUpdate();
System.out.print(s);
} catch (SQLException e2) {
e2.printStackTrace();
}
%>
<jsp:forward page="modify.jsp"></jsp:forward>