Tutorials to .com

Tutorials to .com » Asp » Xml » How to use Microsoft Access and Active Server Pages encrypt your page

How to use Microsoft Access and Active Server Pages encrypt your page

Print View , by: iSee ,Total views: 11 ,Word Count: 203 ,Date: Wed, 22 Apr 2009 Time: 11:19 AM

This is a very simple encryption program, we could see for himself!
<%
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 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 password is incorrect, please try again! </ Center> <p align='center'> <a href = 'javascript: history.go (-1);' > Click here to return to previous page! </ a> "
Response.End
End If
conn.close
%>


Asp and XML related Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.