📄 modify2_user.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%
if(session.getValue("ID")==null)
response.sendRedirect("indexs.jsp");
String name="";
String userpassword="";
String usertype="";
String temp="";
name=request.getParameter("name");
userpassword=request.getParameter("userpassword");
usertype=request.getParameter("usertype");
String url="jdbc:oracle:thin:@10.0.0.4:1521:ORCL";
String user="mms";
String psw="mms123";
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception e){
out.println("没找到数据库驱动!");
e.printStackTrace();
}
try{
Connection con=DriverManager.getConnection(url,user,psw);
String sql="update userinfo set userpassword='"+userpassword+"',usertype='"+usertype+"' where name='"+name+"'";
Statement stm=con.createStatement();
stm.executeUpdate(sql);
stm.close();
temp="OK" ;
}
catch(SQLException e){out.print(e);}
if(temp.equals("OK"))
response.sendRedirect("admin_user.jsp");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" href="image/cs.css" type="text/css">
</head>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -