-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewuser.jsp
88 lines (69 loc) · 1.48 KB
/
viewuser.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<%@ page import="java.sql.*" %>
<%!
Connection con;
Statement st;
ResultSet rs;
String q,email;
%>
<%
try
{
Class.forName("oracle.jdbc.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:xe","username","password");
st=con.createStatement();
email=(String)request.getParameter("email");
session.setAttribute("su2",email);
q="select * from users where email='"+email+"'";
rs=st.executeQuery(q);
%>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
body{
background-image: url("images/bg.jpg");
background-size: 1250px 750px;
}
</style>
</HEAD>
<BODY BGCOLOR="#99CCFF">
<%
while(rs.next())
{
%>
<CENTER>
<B><FONT SIZE="5" COLOR="">USER DETAILS</FONT></B><br><br>
<TABLE border="2" style="border-collapse: collapse">
<TR>
<TD>Email</TD>
<TD><%=email%></TD>
</tr>
<tr>
<TD>Password</TD>
<TD><%=rs.getObject(2)%></TD>
</tr>
</TR>
<TR>
<TD>Designation</TD>
<TD><%=rs.getObject(3)%></TD>
</TR>
</TABLE><BR>
<INPUT TYPE="button" onClick="window.location='viewusers.jsp'" value="BACK">
<INPUT TYPE="button" onClick="window.location='updateuser.jsp'" value="UPDATE USER">
<INPUT TYPE="button" onClick="window.location='deleteuser.jsp'" value="DELETE USER">
<%
}
%>
</FORM>
</BODY>
</HTML>
<%
}
catch(Exception e)
{
out.println(e.toString());
}
%>