if trim(tp_flag(e))<>"" then
tp_flag_count=tp_flag_count+1
%> <input type="radio" value=<%=tp_flag_count%> name=no<%=rs("id")%>> <%=xuanxiang(tp_flag_count)%>、<%=tp_flag(e)%><br>
<%
if tp_flag_count>=10 then exit for
end if
next%>
<br>
<%rs.movenext
next
rs.close%>
<input type=submit value="确定" name=b1> <input type=reset value="重置" name=b1>
</form>
在这里多选调查和单选调查整体思路大致相同,就不详细讲解了,只需要把<input type=”radio” >改变成为<input type=”checkbox”>即可。
(5)secord.asp(数据库中添加调查投票结果)
<!-- #include file="title.asp"-->
<%
if session("ip")=request.ServerVariables("REMOTE_HOST") then
'通过此request.ServerVariables("REMOTE_HOST")获取客户端IP地址,
response.write "您已经填写过调查问卷了,请您20分钟以后在此投票!"
‘由于session对象超时时间为20分钟,在对象超时以后就会自动清空session(“ip”)的值
response.end
end if
if session("ip")="" then
session("ip")=request.ServerVariables("REMOTE_HOST")
‘把机器的IP地址传给session(“ip”),同一IP下次投票就会失效
end if
'单选
|