How to use Microsoft Access and ActiveServerPages to encrypt your pages

Source: Internet
Author: User
This is a very simple encryption program. Let's take a look! % UseridRequest (userid) userpassRequest (userpass) SetconnServer. CreateObject (ADODB. Connection) DBPathServer. MapPath (userinfo. mdb) conn. Opendriver {MicrosoftaccessDriver (*. mdb )};

This is a very simple encryption program. Let's take a look! % Userid = Request (userid) userpass = Request (userpass) Set conn = Server. createObject (ADODB. connection) DBPath = Server. mapPath (userinfo. mdb) conn. open driver = {Microsoft access Driver (*. mdb )};

This is a very simple EncryptionProgram, let's take a look!
<%
Userid = Request ("userid ")
Userpass = Request ("userpass ")

Set conn = Server. CreateObject ("ADODB. Connection ")
DBPath = Server. MapPath ("userinfo. mdb ")
Conn. Open "driver = {Microsoft access Driver (*. mdb)}; dbq =" & DBPath

Userid = trim (userid)
Userpass = trim (userpass)
SQL = "select * from [userinfo]"
Set rsw.conn.exe cute (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" Sorry, this user does not exist or the password is incorrect. Please try again!

Click here to go back to the previous page! "
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.