最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
故事接龙2 handlevote.asp
时间:2008-01-18 编辑:简简单单 来源:一聚教程网
<%
'以下为处理投票的asp程序
if Request.ServerVariables("http_method")="POST" then
if Request.Form("voteradio")<>"" then
'只有用户选择了认为续写得好得文章才进行处理
set rec=server.CreateObject("adodb.recordset")
rec.ActiveConnection="dsn=vote"
if Request.Form("votecomment")<>"" then
'将用户的留言加入到数据中
rec.Source="select * from tbcomment"
rec.Open ,,1,3
tempstr=Request.Form("votecomment")
rec.AddNew
rec("userip")=Request.ServerVariables("remote_addr")
rec("comment")=tempstr
rec.Update
rec.Close
tempstr="
" & tempstr & ""
tempstr=tempstr & "
你投了一票,谢谢
"else
'如果用户没有留言,则
tempstr="这位网友没什么话要说,他/她只是觉得这篇文章接的很好,所以投了一票"
end if
'根据用户的投票更新记录投票次数的数据库
-
下一个: 一个简单的bbs(五)
相关文章
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- asp中获取日期为星期几的技巧 09-14
- Asp编码优化参考 09-14
- .Net Core认证系统源码解析 12-26
- SharePoint Server 2019新特性介绍 01-15