关闭

提交表单没反应。请教!

77人阅读 评论(0) 收藏 举报
<%
dim UserName,sfz,XueHao
UserName=trim(request("UserName"))
sfz=trim(request("sfz"))
XueHao=trim(request("XueHao"))
if XueHao="" or strLength(XueHao)>10 then
founderr=true
errmsg=errmsg & "<br><li>请输入十位标准学号!</li>"
end if
if sfz="" or strLength(sfz)>18 then
founderr=true
errmsg=errmsg & "<br><li>请输入十八位标准身份证号!</li>"
end if
if UserName="" then
founderr=true
errmsg=errmsg & "<br><li>姓名不能为空!</li>"
end if
'判断是否注册。判断学号、姓名、身份证号是否匹配
    CheckInfo="NO"
Set rs_c=server.CreateObject("adodb.recordset")
sql_c="Select top 1 * from stu where xuehao='"&xuehao&"'"
rs_c.open sql_c,conn,1,1
if not rs_c.eof and not rs_c.bof then
'是否注册
if rs_c("vol")<>true then
   Call Alert("亲,你还没有注册。","UserReg.asp")
   else
   '匹配到学号,匹配身份证号码和姓名
if Username=rs_c("Username") and sfz=rs_c("xfz") then
CheckInfo="OK"
else
Call Alert("姓名或身份证信息不匹配。","index.asp")
end if 
end if  
if CheckInfo="ok" then
Call Alert("亲,恭喜你登陆成功。","UserServer.asp")
end if
End If
%>
<table width="490" border="0" cellspacing="0" cellpadding="0">
              <form action="" method="get">
  <tr>
                <td width="150" height="50" align="center"><font color="#000000" style="font-family:'黑体'; font-size:18px;">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</font></td>
                <td width="20">&nbsp;</td>
                <td><table width="95%" height="45" border="0" cellpadding="0" cellspacing="0" style="line-height: 200%; border: 1px ridge #000000">
                  <tr>
                    <td align="center"><input name="XueHao" type="text" id="XueHao" class="input" size="30" maxlength="10"></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="50" align="center"><font color="#000000" style="font-family:'黑体'; font-size:18px;">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</font></td>
                <td>&nbsp;</td>
                <td><table width="95%" height="45" border="0" cellpadding="0" cellspacing="0" style="line-height: 200%; border: 1px ridge #000000">
                  <tr>
                    <td align="center"><input name="UserName" type="text" id="UserName" class="input" size="30" maxlength="16"></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="50" align="center"><font color="#000000" style="font-family:'黑体'; font-size:18px;">身份证号</font></td>
                <td>&nbsp;</td>
                <td><table width="95%" height="45" border="0" cellpadding="0" cellspacing="0" style="line-height: 200%; border: 1px ridge #000000">
                  <tr>
                    <td align="center"><input name="sfz" type="text" id="sfz" class="input" size="30" maxlength="18"></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td colspan="3">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3" align="center"><table width="90%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="50%" height="50" align="center"><table width="70%" height="40" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="center"><input type="submit" name="Submit" value="登陆" style="background-color:#FF6600; width:154; height:40"></td>
                      </tr>
                    </table></td>
                    <td width="50%" align="center"><table width="70%" height="40" border="0" cellpadding="0" cellspacing="0"  >
                      <tr>
                        <td align="center" bgcolor="#CCCCCC"><a href='UserReg.asp' target='_blank'>新用户注册</a></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              </form>
            </table>

最好能写出完整的修改后的代码,谢谢!
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2356次
    • 积分:203
    • 等级:
    • 排名:千里之外
    • 原创:19篇
    • 转载:0篇
    • 译文:0篇
    • 评论:2条
    文章存档
    最新评论