📄 addcategorystep2.jsp
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/Common.jsp"%>
<%@ include file="../incoming/ConnectDB.jsp"%>
<%@ include file="../incoming/Check.jsp"%>
<html>
<head>
<title><%=title%>管理</title>
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
<script Language="JavaScript">
function ToRootMain()
{
top.location="RootMain.jsp"
}
</script>
</head>
<body>
<%
String msg="";
try
{
String categoryname = new String(request.getParameter("categoryname").getBytes("ISO8859_1"),"GBK");
String description = new String(request.getParameter("description").getBytes("ISO8859_1"),"GBK");
sql1 = "INSERT INTO category(CategoryName,Description) VALUES(?,?)";
PreparedStatement prepstmt = null;
prepstmt=con.prepareStatement(sql1);
prepstmt.setBytes(1,categoryname.getBytes("GB2312"));
prepstmt.setBytes(2,description.getBytes("GB2312"));
prepstmt.executeUpdate();
}
catch(Exception e)
{
msg = e.getMessage();
}
%>
<table border="1" width=700 align=center cellpadding=0 cellspacing=0>
<tr align="center" bgcolor="#CCCCCC" height=25>
<td height="42"><a class="title">添加栏目</a></TD>
</tr>
<tr>
<td height="56" align="center" ><div align="right"></div><span class="text">
<%
if(msg.equals(""))
out.println("添加栏目成功!");
else
out.println("添加栏目失败!错误原因:"+msg);
%>
</span></td>
</tr>
<tr>
<td height="36" align=center ><FONT color=#000000>
<input name=Submit type=button value="返回栏目管理" onClick="ToRootMain()">
</font></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -