sel1=replace(sel1," ","")
tp=split(sel1,",")
'利用split把多选框提交的信息分割开,分别添加到数据库字段中
for j=0 to ubound(tp)
rs2("调查项目"&tp(j))=rs2("调查项目"&tp(j))+1
next
rs2.update
end if
rs2.close
next
rs3.close%>
(6)look.asp(查看调查投票结果)
在编写look.asp代码之前先看一下调查结果界面的大体样式,如图3所示,然后在对其代码进行详细分析。

图3
<!-- #include file="title.asp"-->
<table width=90% align=center cellpadding="1" cellspacing="1" border=0>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from 调查表 where id="&request("id"),c1,1,1
'request("id")为调查表中ID字段值
tp_flag=0
tp_flag_count=0
tp_flag_all=0
for i=1 to 10
|