How to encrypt your pages using Microsoft Access and Active Server pages

Source: Internet
Author: User
Tags trim
This is a very simple encryption program, everyone look at themselves!
<%
UserID = Request ("userid")
Userpass = Request ("Userpass")
Set conn = Server.CreateObject ("ADODB. Connection ")
DBPath = Server.MapPath ("Userinfo.mdb")
Conn. Open "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath
Userid=trim (userid)
Userpass=trim (Userpass)
Sql= "SELECT * from [UserInfo]"
Set Rs=conn.execute (SQL)
While not (RS.BOF or rs.eof)
If Userid=trim (RS ("username")) and Userpass=trim (RS ("password") then
Flag = "1"
End If
Rs.movenext ()
Wend
If flag = "1" Then
Rs.close ()
Else
Rs.close ()
Response.Write "<center> Sorry, this user does not exist or the password is incorrect, please try again!" </center><p align= ' center ' ><a href= ' Javascript:history.go (-1); ' > Click here to go back to the previous page! </a> "
Response.End
End If
Conn.close
%>

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.