1-1.asp
-------------------------------------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>无标题文档</title>
</head>
<body>
<form action="1-2.asp" method="post">
<label>
用户名:
<input name="name" type="text" id="name" />
</label>
<label></label>
密码:
<label>
<input name="pass" type="password" id="pass" />
</label>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</form>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------
1-2.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html >
<head>
<title>无标题文档</title>
<% session("name")=request.Form("name") %>
</head>
<% session("name")=request.Form("name")
session("pass")=request.Form("pass")
session("Admin")=cstr("Admin")
session("pass")=cstr("pass")
%>
<body>
<% if session("name")=session("Admin") and session("pass")=session("pass") then
Response.Write session("name")&"您好,您是合法用户"
else
response.Redirect("1-3.asp")
end if %>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------
1-3.asp
-------------------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>无标题文档</title>
</head>
<body>
<%= session("name") &"您是非法用户" %>
</body>
</html>
---------------------------
问题状况:当我在用户名的输入Admin的时候一样会执行Admin你好,你是合法用户.这里到底是哪儿出了问题了呢?
问题解决了,就出现在红色字体的部分.看来学习还真是不能马虎的呀