ASP to achieve the simplest encryption

Source: Internet
Author: User
Encrypt me in the Chinese Material Network forum to see netizens ask how simple encryption, concrete implementation can write:

Forget with Asp,perl.

Write a landing form first. Suppose reg.asp



<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> West Road Landing Page </title>

<body>
<form action= "pass.asp" method= "POST" >
<table cellpadding=2 cellspacing=0 border=0>
<tr>
<td><font face= "Arial,helvetica" size= "2" ><b>Username</b></font></td>
<td><input type= "text" name= "username" size= "></td>"
</tr>
<tr>
<td><font face= "Arial,helvetica" size= "2" ><b>Password</b></font></td>
<td><input type= "password" name= "password" size= "></td>"
</tr>
<tr>
&LT;TD colspan= "2" ><input type= "Submit" value= "Log in" ></td>
</tr>
</table>
</FORM>
<p><a href= "1.asp" > enter </a></p>
<p><span lang= "en-US" ><a href= "signout.asp" >loginout</a></span></p>

</body>



One more login verification pass.asp

<%
Option Explicit
Dim username, password

Username = Request.Form ("username")
Password = request.form ("password")

' Change the username and password values below change the login
if (username = "admin") and (password = "admin") then
Response.Cookies ("loginadmin") = "True"
Response.Redirect ("Landing successful. asp")
End If

Response.Redirect ("Login.asp")
%>
Success enters the landing success. asp page
Returns Login.asp if failed

Following logout page: loginout.asp

<%
Response.Cookies ("loginadmin") = ""
Response.Redirect ("Login.asp")
%>


You can also use the database to store, of course, multi-user time. Simple words like this will do.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.