⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 custom_modify_deal.jsp

📁 这是我老师布置一个学习任务:保险管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.lang.*"%>
<jsp:useBean id="connDB" scope="page" class="beans.connDB"/>
<jsp:useBean id="chStr" scope="page" class="beans.chStr"/>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
<%
if(request.getParameter("custom_id")!=""){
	String custom_id=chStr.chStr(request.getParameter("custom_id"));
	String custom_password=chStr.chStr(request.getParameter("custom_password"));
	String custom_property=chStr.chStr(request.getParameter("custom_property"));
	String custom_name=chStr.chStr(request.getParameter("custom_name"));	
	String custom_address=chStr.chStr(request.getParameter("custom_address"));
	String custom_remark=chStr.chStr(request.getParameter("custom_remark"));
	String leader=chStr.chStr(request.getParameter("leader"));
    String telephone=chStr.chStr(request.getParameter("telephone"));
	String mobile_phone=chStr.chStr(request.getParameter("mobile_phone"));
	String fax=chStr.chStr(request.getParameter("fax"));
	String photo=chStr.chStr(request.getParameter("photo"));	
	String register_date=chStr.chStr(request.getParameter("register_date"));
	String user_id=chStr.chStr(request.getParameter("user_id"));
	String communicating_company=chStr.chStr(request.getParameter("communicating_company"));

	String sql="update Customer set custom_password='"+custom_password+"',custom_property='"+custom_property+"',custom_name='"+custom_name+"',custom_address='"+custom_address+"',custom_remark='"+custom_remark+"',leader='"+leader+"',telephone='"+telephone+"',mobile_phone='"+mobile_phone+"',fax='"+fax+"',photo='"+photo+"',register_date='"+register_date+"',user_id='"+user_id+"',communicating_company='"+communicating_company+"' where custom_id='"+custom_id+"'";
	out.println(sql);
	int ret=0;
	ret=connDB.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='index.jsp';</script>");
	}
}
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -