我的这个程序是用来控制一个同学只可以选3个题目 但是出错了 不知道错在那么 各位大哥大姐帮我看看啊
<!--#include file="conn.asp"-->
<!--#include file="top1.asp"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type"
content="text/html; charset=gb2312">
[知识问答ωωω.χiuGoo.сom]
</head>
<%
if request("submit")="提交内容" then
xm=request("xm")
xh=request("xh")
bj=request("bj")
keyid=cstr(request("keyid"))
leibie=cstr(request("leibie"))
set
rs=server.createobject("adodb.recordset")
sql="select * from xuanti
where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("xm")=xm
rs("xh")=xh
rs("bj")=bj
rs("timu")=keyid
rs("leibie")=leibie
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
<!-- sub message
dim shuzi
shuzi=1
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from xuti where xm= "& xm
shuizi= shuzi+1
if rs.bof and rs.eof then response.Write
if shuzi<=3 then
shuizi= shuzi+1
response.write "选题成功,<a
href=setclass.asp>[请单击这里返回]</a>"
else
response.write "您已经选了三个题目,不可以在
选了!<a href=index.asp>[请单击这里返回]</a>"
end sub
call message
-->
浏览器显示缺少IF 我官爵是不是我的循环语句和我后面接的判断语句有问题
<!-- sub message
dim shuzi
shuzi=1
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from xuti where xm= "& xm
shuizi= shuzi+1
if rs.bof and rs.eof then response.Write
if shuzi<=3 then
shuizi= shuzi+1
response.write "选题成功,<a
href=setclass.asp>[请单击这里返回]</a>"
else
response.write "您已经选了三个题目,不可以在
选了!<a href=index.asp>[请单击这里返回]</a>"
end sub
call message
-->
可是我查不出什么毛病
<!--#include file="conn.asp"-->
<!--#include file="top1.asp"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
if request("submit")="提交内容" then
xm=request("xm")
xh=request("xh")
bj=request("bj")
keyid=cstr(request("keyid"))
leibie=cstr(request("leibie"))
set rs=server.createobject("adodb.recordset")
sql="select * from xuanti where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("xm")=xm
rs("xh")=xh
rs("bj")=bj
rs("timu")=keyid
rs("leibie")=leibie
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
End If
sub message
dim shuzi
shuzi=1
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from xuti where xm= "& xm
shuizi= shuzi+1
if rs.bof and rs.eof then response.Write
if shuzi<=3 then
shuizi= shuzi+1
response.write "选题成功,<a href=setclass.asp>[请单击这里返回]</a>"
else
response.write "您已经选了三个题目,不可以在选了!<a href=index.asp>[请单击这里返回]</a>"
End if
End If
end sub
call message
%>