| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 381 人关注过本帖
标题:[求助]调查投票---不能输出票数
只看楼主 加入收藏
lvye
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-17
收藏
 问题点数:0 回复次数:5 
[求助]调查投票---不能输出票数

下面是源码:


<!--#include file="conn/conn.asp" -->
<% if request("radiobutton")<>"" then

select case request("radiobutton")
case "shou" Conn.execute("Update vote set shou=shou+1 where id =1")
case "person" Conn.execute("Update vote set person=person+1 where id =1")
case "inform" Conn.execute("Update vote set inform=inform+1 where id =1")
case "music" Conn.execute("Update vote set music=music+1 where id =1")
case "liter" Conn.execute("Update vote set liter=liter+1 where id =1")
case "board" Conn.execute("Update vote set board=board+1 where id =1")

end select

Response.write("<script>alert(""感谢你的投票!"");</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>::绿叶小屋--网上投票</title>
<style type="text/css">
<!--
body {
font-family: "宋体";
font-size: 12px;
color: #CC3366;
text-decoration: none;
}
.td {
font-family: "宋体";
font-size: 14px;
font-weight: bold;
color: #CC3366;
text-decoration: none;
border: 5px dotted #FF6699;
}
-->
</style>
</head>

<body>
<table width="330" border="0" align="center" cellpadding="0" cellspacing="3" class="td">
<% Set conn=Server.Createobject("ADODB.CONNECTION")
set rs=conn.execute("select * from vote ")

if not rs.bof and rs.eof then
%>
<tr>
<td width="73">首页</td>
<td width="200"><hr align="left" width="<%= rs("shou") %>"></td>
<td width="50"><%= rs("shou") %>票</td>
</tr>
<tr>
<td width="73">个人栏</td>
<td width="200"><hr align="left" width="<%= rs("person") %>"></td>
<td width="50" ><%= rs("person") %>票</td>
</tr>
<tr>
<td width="73">资讯</td>
<td width="200"><hr align="left" width="<%= rs("inform") %>"></td>
<td width="50"><%= rs("inform") %>票</td>
</tr>
<tr>
<td width="73">音乐</td>
<td width="200"><hr align="left" width="<%= rs("music") %>"></td>
<td width="50"><%= rs("music") %>票</td>
</tr>
<tr>
<td width="73">文学</td>
<td width="200"><hr align="left" width="<%= rs("liter") %>"></td>
<td width="50"><%= rs("liter") %>票</td>
</tr>
<tr>
<td width="73">留言</td>
<td width="200"><hr align="left" width="<%= rs("board") %>"></td>
<td width="50"><%= rs("board") %>票</td>
</tr>


</table>
<% end if
rs.close:set rs=nothing %>
</body>
</html>

可以写进数据库.就是不能输出.帮帮偶

搜索更多相关主题的帖子: 调查 request include person 
2006-07-17 20:19
labid
Rank: 1
等 级:新手上路
帖 子:151
专家分:0
注 册:2006-6-20
收藏
得分:0 
if not rs.bof and rs.eof then
这句有错吧!
你看改成
if not rs.bof then
能想吗?
2006-07-17 23:36
lvye
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-17
收藏
得分:0 
不行啊.不知哪出错了.
2006-07-18 01:31
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 
是票数不能显示还是那个长度条不能显示?

http://www./
2006-07-18 09:05
lvye
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-17
收藏
得分:0 
两个都不能啊
2006-07-18 21:40
lvye
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-17
收藏
得分:0 
Set conn=Server.Createobject("ADODB.CONNECTION")
OK了,原来这句不用的
2006-07-18 23:06
快速回复:[求助]调查投票---不能输出票数
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015061 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved