Solution 1: Use two files to solve this problem: userandpwd. asp and secretarticle. 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 know the URL of asppwdrst. asp, you 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 = "OK" name = _ "B1">
</P> </center> </div>
</Form>
</Body>
</Html>
Secretarticle. asp
'The secret information page, and is responsible for verifying the account and password (account: liyanbing, password: 13066093625), after the pass, you can browse.
<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! login 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 qingxue cloud login </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 = "Logon">
</Form>
</Body>
</Html>
[1]