这是一个图书馆系统
源代码在线查看: adduser.jsp~74~
无标题文档
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
Adduser
Modifyuser
Deletuser
Searchuser
BookMenu
Add user
ID:
Course:
Number:
Code:
Phone:
Email:
Oicq:
Maxbook:
try{
if(request.getParameter("adduserenter")!=null){
Connection conn=Library.getConn();
Statement stmt=conn.createStatement();
String addid = request.getParameter("adduserid");
String addcourse = request.getParameter("addusercourse");
String addstudentnumber = request.getParameter("addusernumber");
String addcode = request.getParameter("addusercode");
String addphone = request.getParameter("adduserphone");
String addemail = request.getParameter("adduseremail");
String addoicq = request.getParameter("adduserqq");
String addmaxbook = request.getParameter("addusermax");
String insertStr = "insert into user(id,course,studentnumber,code,phone,email,oicq,maxbook) values('" + addid + "','" + addcourse + "','" + addstudentnumber + "','" + addcode + "','" + addphone + "','" + addemail + "','" + addoicq + "','" + addmaxbook + "')";
stmt.execute(insertStr);
response.sendRedirect("success.jsp");
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
%>