标题:求助:我刚刚开始学建站,这是人家的一个在线考试系统,我想高手帮我分解下
取消只看楼主
天堂小孩
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-9
 问题点数:0 回复次数:1 
求助:我刚刚开始学建站,这是人家的一个在线考试系统,我想高手帮我分解下
<%@ Language=VBScript %>
<% option explicit %>
<!--#include file="conn.asp"-->
<% if Request.ServerVariables("http_method")="POST" then   
    if Request.Form("submit")="登    录" then
        '学生登录的处理
           dim rs,sql    
        set rs = server.createobject("adodb.recordset")
                sql="select * from student where studentname='" & Request.Form("studentname") & "' and studentpassword='" & Request.Form("studentpassword") & "'"
                    rs.open sql,conn,1,1
               if err.number<>0 then
        response.write "数据库操作失败:"&err.description
               else if rs.bof and rs.eof then
            
                response.write "<center>对不起,请输入正确的用户名和密码。</center>"
                rs.close           
           else        
                            rs.close
                session("studentname")=request.form("studentname")
                set rs=nothing
                call endConnection()
                Response.Redirect "selectsubject.asp"
            
        end if
       end if    
        
        '用户注册
    elseif Request.Form("submit")="注    册" then      
        Response.Redirect "register.asp"
        '管理员进行管理
    elseif Request.Form("submit")="管    理" then
        Response.Redirect "admin/login.asp"        
    end if
end if
%>
这上面的代码是什么意思啊??能帮助逐句分析下吗?
搜索更多相关主题的帖子: quot 考试 系统 Request 
2008-05-09 23:05
天堂小孩
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-9
得分:0 
谢谢指教,正在买书看,没翻着这些才问的,呵呵,谢谢了。
2008-05-11 20:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-213446-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.467022 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved