表单处理脚本 在vote.htm中各项数据都填写完毕后,单击确定投票按钮,表单的数据就被提交, 本次评优共有4个候选人,但只能选两个。故用复选框。 投票的有效性通过是否是本校学生,且是否投过票来判断。 if request("passno")<>"" then sql="select * from stud where password="&"'"&request("passno")&"'" &"and yitu=0" set rs=cn.execute(sql) if rs.eof then%> <h2 align=center><%response.write"你无权投票"%></h2> 本设计允许少选,不允许多选。通过判断Vote投票界面传递过来的复选按纽值的长度看是否多选。 vo=request("cand") if len(vo)>4 then%> <h2 align=center><%response.write "多选了,无效"%></h2>