菜鸟投票问题。请高手出招
为什么我选择了1个选项 怎么会全部+1 了 表 toupiao 投标名称字段:xing_tpname 累计投标字段:xing_ddk
投票选项:
=======================================================
<form name="form" id="form" action="?action=toupiao" method="post" target="votedo">
<%
sql="select * from xing_toupiao"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof%>
<input type='checkbox' name=<%=rs("id")%> value='<%=rs("id")%>'><%=rs("xing_tpname")%>
<%end if
rs.close
set rs=nothing
%>
<input name="action" value="点击投票" type="image" src="img/button_03.gif" width="71" height="24" border="0"> </form>
========================================================
save
--------------------------------------------------------
<%
if request("action")="toupiao" Then
idTmp = Split("id")
For i = 0 To UBound(idTmp)
conn.execute("update xing_toupiao set xing_ddk=xing_ddk+1 where id="& idTmp(i))
Response.write "<script>alert(""投票成功"");location.href=""index.asp"";</script>"
Next
end If
%>
[[it] 本帖最后由 xing599666 于 2009-7-23 11:12 编辑 [/it]]