唉~~!!
<input type="hidden" name="ctype" value="add"/>
这里本来都没值!!怎么执行!!!
有的,前面的document.form1.ctype="add";有给它值
哦哦~
[此贴子已经被作者于2005-11-27 21:52:00编辑过]
给这里的一个班主搞定了.........
<%
if trim(request("ctype"))="add" then
student=request("student")
pwd=request("pwd")
sex=request("sex")
classes=request("classes")
number=request("number")
sqlfind="select * from student where 学号='"&trim(request("number"))&"'"
set rsfind=conn.execute (sqlfind)
if not rsfind.eof then
errmsg=errmsg&"△ 此用户名已被注册,请改名!\n"
end if
if errmsg<>"" then
Conn.Close
Set conn = nothing
Set rsfind = nothing
response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
response.end
else response.write ("这里会执行吧")
end if
set rs=server.createobject("ADODB.RECORDSET")
sql="select * from student where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("姓名")=student
rs("密码")=pwd
rs("性别")=sex
rs("班号")=classes
rs("学号")=number
rs.update %>
<script language=javascript>
alert ("注册成功");
</script>
<%end if%>
我更郁闷,你把全部有关的代码数据库发到我EMAIL
明天帮你搞!!我就不信搞不好!!
rainic2004@163.com