📄 commentsave.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
dim name,email,comment,id
id=request("id")
name=checkstr(trim(request.form("name")))
email=checkstr(trim(request.form("email")))
comment=checkstr(trim(request.form("comment")))
if not isinteger(id) then
call mb("请指定您要评论的Flash作品!","",0)
end if
if name="" or strlength(name)>50 then
call mb("请留下您的大名(不能大于25个汉字)!","",0)
end if
if email<>"" and not isemail(email) then
call mb("请正确输入您的Email!","",0)
end if
if comment="" or strlength(comment)>250 then
call mb("评论内容只能在1-125个汉字之间!","",0)
end if
'保存评论
sql="insert into comment (name,email,comment,id) values('"&name&"','"&email&"','"&comment&"',"&id&")"
conn.execute(sql)
'更新Flash作品的评论数
sql="update flash set commentnum=commentnum+1 where id="&id
conn.execute(sql)
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>保存Flash作品评论</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/bg.gif">
<br>
<br>
<br>
<br>
<br>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="122" height="30" align="center">发 表 评 论 成 功!</td>
</tr>
<tr>
<td height="30"> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -