注册 登录
编程论坛 ASP技术论坛

点击一个连接,跳转到一个别的网站,点击数增加。

zzhman 发布于 2011-03-10 11:19, 770 次点击
点击一个连接,跳转到一个别的网站,点击数增加
我自己做了个网站,新闻题目调取的都是自己数据库的内容,想实现点击题目跳转到其他视频网站,新闻题目的点击率也是记录在我自己的数据库内。
即:实现点击一次题目,点记录+1,内容跳转到别的网站!
1 回复
#2
dzt00012011-03-10 12:46
加一个跳转页面redirect.asp,用id做参数

下面的代码供参考
id=Request.QueryString("id")

sql="select * from [news] where id="&id&""
Rs.Open sql,Conn,1,3
if Rs.eof and Rs.bof then    '数据集为空
    ''''出错提示
else
    link=Rs("link")
    Rs("hit")=Rs("hit")+1
    Rs.update
end if
Rs.close
Set Rs = Nothing

Response.Redirect(link)
1