📄 addgoods.asp
字号:
<%
if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=css.css rel=STYLESHEET type=text/css>
</head>
<%
sql="select * from hw where hw_id="&request("hw_id")
rs.open sql,conn,3,3
if rs.eof then
response.write "该编号没有存在与商品库中,请务必保证推荐商品的编号已经存在与商品库中"
response.end
end if
rs.close%>
<%
hw_id=request("hw_id")
hw_name=request("hw_name")
hw_pic=request("hw_pic")
hw_content=request("hw_content")
if not(isnumeric(hw_id)) then
errmsg="<br>"+"<li>商品的编号应该为数字"
founderr=true
end if
if hw_name="" then
errmsg=errmsg+"<br>"+"<li>货物名称不能为空"
founderr=true
end if
if founderr=true then
response.write errmsg
response.write "<br>"
response.write "<a href=tuijiangoods.asp>返回</a>"
response.end
else
sql="select * from tuijiangoods"
rs.open sql,conn,3,3
rs.addnew
rs("hw_id")=hw_id
rs("hw_pic")=hw_pic
rs("hw_content")=hw_content
rs("hw_name")=hw_name
rs.update
response.write "添加新的推荐商品成功"
response.write "<br>"
response.write "<a href=tuijiangoods.asp>返回</a>"
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -