commentsave.asp
来自「网络商城系统」· ASP 代码 · 共 34 行
ASP
34 行
<!--#include file="conn.asp"-->
<%
if request.form("code")="" then
response.write"<script language=javascript>alert('用户名必须填写');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("content")="" then
response.write"<script language=javascript>alert('评论内容必须填写');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if len(request.form("content"))>200 then
response.write"<script language=javascript>alert('请控制在100字以内');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
sp_id=request("id1")
if sp_id="" then
response.write"<script language=javascript>alert('没有此商品存在');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from pl"
rs.open sql,conn,3,3
rs.addnew
rs("sp_id")=sp_id
rs("code")=trim(request("code"))
rs("content")=trim(request("content"))
rs("date")=now()
rs("ip")=request.servervariables("remote_addr")
rs.update
response.write"<script language=javascript>alert('成功提交评论,请等待管理员审核或者回复,谢谢您');this.location.href='javascript:history.go(-1)';</script>"
rs.close
set rs=nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?