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

📄 host-update.jsp

📁 网上购物系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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>
<jsp:useBean id="ConBean" scope="session" class="com.bitc.ch13.DBCon"/>
<%
request.setCharacterEncoding("gb2312");
String host = request.getParameter("host");
String a = request.getParameter("a");
String b = request.getParameter("b");
String id = request.getParameter("id");
String jb = request.getParameter("jb");
String ids = request.getParameter("ids");
Connection cond = ConBean.getConnection();
Statement stmt = cond.createStatement();
try{
String	strdel = "delete jsp8_vhost where id = '"+id+"'";
stmt.executeUpdate(strdel);
}catch(Exception ee){
out.println(ee.toString());
}
try{
String	strSQL = "INSERT INTO jsp8_vhost(host,mc,a,b,ids) Values ('"+host+"','"+jb+"','"+a+"','"+b+"','"+ids+"')";
stmt.executeUpdate(strSQL);
}catch(Exception e){
out.println(e.toString());
return;
}
stmt.close();
ConBean.close();
%>
<script language="vbscript">
				msgbox "成功更新!",vbInformation,"提示"
				window.location="host.jsp?id=<%=host%>"
			</script>
</body>
</html>

⌨️ 快捷键说明

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