How to maximize the security login function? _ Programming 10000 Q

Source: Internet
Author: User

<%
If not IsEmpty (" cust-id "cust-id

' user logs in and points to the home page .
 Response.Redirect ("navigation/dashbrd.asp")

 ' add a real home page URL here.

end if

Blogin = false

' set flag
berror = False
If IsEmpty (Request (uiduid pwdpwd

' check for null characters .
  Blogin = True
Else

--------------------------------------------------------------------------------------------------------------- -
'Verify that the user is in the Database Save password table.
"Select*From Customer WHERE cust-id=′   " &Request"Uid")&"′and′cust-pwd=′"&Request (″pwd″) &" the"
' connect the database , where request (″uid″) and request (″pwd″) are the user names and passwords in the form in HTML on this page text.

   Gbfound = False
--------------------------------------------------------------------------------------------------------------- -

   If not rscust.bof and not rscust.eof then
     Gbfound = True
   End If

   If Gbfound Then
     Session ("Cust-id") = Rscust.fields ("Cust-id"
' session. session Span lang= "en-US" "cust-pwd "cust-pwd

' this is the user password session Span lang= "en-US" "powerpower

' This is a user right in the database , optional .

     ' RsCust.ActiveConnection.Execute ( update Customer set Cust-login =′< Span Times New Roman '; Mso-hansi-font-family: ' Times mso-bidi-font-size:9.0pt ' > & Now &′where cust_id = Span lang= "en-us" "& cust-id&

' update last login time , optional .

    Response.Redirect ("navigation/dashbrd.asp")

'Real HomeUrl.
   Else
     ′uid and password not found
     Berror = True Blogin = True
   End If

Rscust.close
 ' close the record .
  Mycn-login. Close
  Set mycn-login=nothing
 End If
%>   

--------------------------------------------------------------------------------------------------------------- -

' login page .

<form name="login" action="default.asp" method="post" target ="-top">

'html add form, and set as spontaneous send page . Actionurl,,,,

input name=uid Size=10maxlength=10 style=< Span lang= "en-US" "height:21px; Width:101px> span>

<input name="pwd"type=" password" size= "maxlength=" ">

[1]

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.