📄 modify_deal.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="connBean" scope="page" class="beans.connDB"/>
<jsp:useBean id="chStr" class="beans.chStr" scope="page" />
<!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>
</head>
<body>
<%
String username=request.getParameter("username");
if (username!=null && username.length()>0 ){
String PWD=chStr.chStr(request.getParameter("PWD1"));
String birthday=request.getParameter("birthday");
String sex=chStr.chStr(request.getParameter("sex"));
String OICQ=chStr.chStr(request.getParameter("OICQ"));
String tel=chStr.chStr(request.getParameter("tel"));
String homepage=chStr.chStr(request.getParameter("homepage"));
String address=chStr.chStr(request.getParameter("address"));
String postcode=request.getParameter("postcode");
String Email=chStr.chStr(request.getParameter("Email"));
int ret=0;
String sql="update tb_user set PWD='"+PWD+"',birthday='"+birthday+"',sex='"+sex+"',OICQ='"+OICQ+"',tel='"+tel+"',homepage='"+homepage+"',address='"+address+"',postcode='"+postcode+"',email='"+Email+"' where username='"+username+"'";
ret=connBean.executeUpdate(sql);
if(ret!=0){
out.println("<script language='javascript'>alert('资料修改成功!');window.location.href='index.jsp';</script>");
}else{
out.println("<script language='javascript'>alert('资料修改失败!');window.location.href='modify.jsp';</script>");
}
}else{
response.sendRedirect("modify.jsp");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -