还有一个Regsubmit.asp程序
<!--#include file="Odbc_connection.asp"-->
<!--#include file="Function.asp"-->
<%
On Error Resume Next
insertok=trim(request.Form("insertok"))
username=trim(request.Form("username"))
password=trim(request.Form("password"))
password2=trim(request.Form("password2"))
reg=trim(request.Form("reg"))
reg1=trim(request.Form("reg1"))
typed=cint(trim(request.Form("typed")))
address=trim(request.Form("ADDRESS"))
department=request.Form("addone_id")
class1=request.Form("addtwo_id")
number=trim(request.Form("number"))
number1=number
Email=trim(request.Form("Email"))
tel=trim(request.Form("TEL"))
ip=request.ServerVariables("REMOTE_ADDR")
'-------------------------------------------
IF DEPARTMENT="请选择教师院系" or class1="请选择班级" THEN
response.write"<script>alert('请选择所在院系和班级!');location='REGOK.asp'</script>"
response.End()
END IF
if class1<>"—学校督导—" then
if class1<>"—教师同行—" then
strsql="select * from class where id="&class1
set rs=db.execute(strsql)
class1=rs("classname")
end if
end if
strsql="select * from department where id="&department
set rs=db.execute(strsql)
department=rs("department")
'----------------------------------------------
'--------------------将系别数字转换成文字
typedok=TONGGUO
if Email="" then
Email="无"
end if
if address="" then
address="无"
end if
if tel="" then
tel="无"
end if
'----------------------------------------------
user=number
'-----------------------------------------------产生用户ID
if username="" or password="" or number1="" then
response.write"<script>alert('请把信息添完整');location='regok.asp'</script>"
response.End()
end if
'------------------------------------------
if reg<>reg1 then
response.write"<script>alert('附加码错误!');location='regok.asp'</script>"
response.End()
end if
'----------------------------------------------------------------------
[知识问答ωωω.χiuGoo.сom]
if db.errors.count>0 then
response.write"<script>alert('数据提交时出现错误,请重新申请!');location='regok.asp'</script>"
end if
'------------------------------------------------------------
strsql="INSERT INTO userinfo(USERNAME,PASSWORD,REALNAME,TYPED,TYPEDOK,EMAIL,NUM,TEL,ADDRESS,SUBMITDATE,IP,DEPART,CLASS1)"
strsql=strsql&"values('"&USER&"','"&PASSWORD&"','"&USERNAME&"',"&TYPED&","&TYPEDOK&",'"&EMAIL&"','"&NUMBER&"','"&TEL&"','"&ADDRESS&"','"&now()&"','"&IP&"','"&DEPARTMENT&"','"&CLASS1&"')"