ASP User Login Program

Source: Internet
Author: User

<%
Dim sql
Dim rs
Dim username
Dim password
Username=replace (Trim (Request.Form ("username")), "'", "" "
Password=replace (Trim (Request.Form ("password")), "'", "" "
PASSWORD=MD5 (password)
Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from [User] where lockuser=false and Username= '" & Username & "' and password= '" & Password ;"'"
Rs.Open sql,conn,1,1
If not (RS.BOF and rs.eof) then
If Password=rs ("password") then
Session ("UserName") =rs ("UserName")
' Session ("purview") =999
Response.Redirect "Ment1.asp"
End If
End If
Rs.close
Conn.close
Set rs=nothing
Set conn=nothing
%>


<style type= "Text/css" >
A:link,a:active,a:visited{text-decoration:none; Color: #000000}
A:hover{color: #4455aa}
body{
font-size:12px;
COLOR: #000000;
Font-family: Song body;
Background-color: #999999;
Scrollbar-face-color: #C0C0C0;
Scrollbar-highlight-color: #C0C0C0;
Scrollbar-shadow-color: #C0C0C0;
Scrollbar-3dlight-color: #E0E0E0;
Scrollbar-arrow-color: #000000;
Scrollbar-track-color: #E0E0E0;
Scrollbar-darkshadow-color: #C0C0C0;
}
td{
Font-family: Song body;
font-size:12px;
line-height:15px;
}
Td. TableBody1
{
Background-color: #137171;
}
. tableBorder1
{
width:97%;
border:1px;
Background-color: #0D4F4F;
}
. table {border-collapse:collapse; border-left:1px solid #000000; border-right:1px solid #000000; Background-color: #fff FFF}
input{border-top-width:1px; padding-right:1px; padding-left:1px; border-left-width:1px; font-size:9pt; Border-left-color: #cccccc; border-bottom-width:1px; Border-bottom-color: #cccccc; padding-bottom:1px; Border-top-color: #cccccc; padding-top:1px; height:18px; border-right-width:1px; Border-right-color: #cccccc}
</style>

<body>
<br><br><br>
<table align= ' center ' width= ' border= ' 0 ' cellpadding= ' 4 ' cellspacing= ' 0 ' class= ' border ' >
<tr >

&LT;TD height= ' colspan= ' 2 ' align= ' center ' class= ' title ' > Operation: Confirm identity Failure!</td>
</tr>
<tr>
&LT;TD height= ' colspan= ' 2 ' align= ' center ' class= ' tdbg ' > <br>
<br>
User name or password error!!! <br>
<br> <a href= ' javascript:onclick=history.go ( -1) ' > ' Back ' </a> <br>
<br></td>
</tr></table></body>

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.