这是一个图书馆管理系统的jsp代码
源代码在线查看: searchuser.jsp~9~
Search user
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
Adduser
Modifyuser
Deletuser
Searchuser
BookMenu
Delete user
ID:
***
try{
if(request.getParameter("searchuserenter")!=null){
String id = request.getParameter("searchuserid");
Connection conn=Library.getConn();
PreparedStatement pstmt=conn.prepareStatement("select * from user where id ='" + id + "'");
ResultSet rs = pstmt.executeQuery();
out.println("results below:");
if (rs.next()){
Library.setuid(rs.getString("id"));
Library.setucourse(rs.getString("course"));
Library.setustudentnumber(rs.getString("studentnumber"));
Library.setucode(rs.getString("code"));
Library.setuphone(rs.getString("phone"));
Library.setuemail(rs.getString("email"));
Library.setuoicq(rs.getString("oicq"));
Library.setumaxbook(rs.getString("maxbook"));
}
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
%>