Solution 1: Use two files to solve this problem:Userandpwd. aspAndSecretarticle. asp. The former is only responsible for providing the user name and password, and the latter is responsible for verification. In this way, even if you knowAsppwdrst. aspLocationURLAnd will never see anything.
Userandpwd. asp
<Html>
<Body>
<Form name = "form1" action =
"Secretarticle. asp" method _
= "POST">
<Input type = "hidden" name = "VTI-GROUP" value = _ "0">
<Div align = "center"> <center> <p>
Account<Input type = "text"
Name = "T1" size = "20">
Password<Input type = "password" name = "T2" size = _ "20">
<Input type = "submit" value ="Confirm"Name = _" B1 ">
</P> </center> </div>
</Form>
</Body>
</Html>
Secretarticle. asp
'Secret information page,And is responsible for verifying the account and password (account: Liyanbing,Password13066093625),After passing,Can be viewed.
<Html>
<% If rtrim (request. form ("t1") =
"Liyanbing" and _ rtrim (request. form ("t2") =
"13066093625" then %>
<Body>
<P align = "center"> <font face =""Size =" 7 "_ color =" # 0000ff ">
Congratulations,Logon successful!
</Font> </p>
</Body>
<% Else %>
<Body>
<P align = "center"> <font face =""Size =" 7 "_ color =" # 0000ff ">
Enter the user name and password!
</Font> </p>
</Body>
<% End if %>
</Html>
The second method is simpler, but the same function is implemented:
Login. asp
'Logon page
<% @ Language = vbscept %>
<@ Response. Buffer = true %>
<Html>
<Head> <title>Welcome to Alibaba Cloud</Title>
<Body>
<%
If request ("username") = "liyanbing" and request ("password") = "13066093625" then
Response. redirect "chunfeng. asp"
'Default Account: Liyanbing;Password: 13066093625;Document page: Chunfeng. asp.
End if
%>
<Font style = "font-size: 12pt">Enter your account and password"</Font> <br>
<Form action = "login. asp" method = "post">
<Br>Account: <Input type = text name = "username">
<Br>Password: <Input type = password name = "password">
<Br> <input type = submit value ="Login">
</Form>
</Body>
</Html>
[1]