How to check Uname/Pword from database

Results 1 to 3 of 3

Thread: How to check Uname/Pword from database

  1. #1
    Rainier Guest

    Default How to check Uname/Pword from database

    G&#039;day<BR>Could somebody help my out with my problem. I&#039;m trying to check the Username and Password from a Database but don&#039;t know how.<BR>Could somebody give me a code so I can go further.<BR><BR>Regards,<BR>Rainier

  2. #2
    Join Date
    Dec 1969

    Default RE: How to check Uname/Pword from database

    &nbsp;<BR>heres a bit of code try and work things out for your own situation <BR>good luck<BR>&#060;%<BR>myDSN="DRIVER={Microsoft Access Driver (*.mdb)};"<BR>myDSN=myDSN & "DBQ=" & Server.MapPath ("/yourDb.mdb")<BR>UserName = Request.form("txtName")<BR>Password = Request.form("txtPassword")<BR>set conn = server.createobject("adodb.connection")<BR>conn.op en mydsn<BR>SQLstmt = "select * from tblUser where username=&#039;" <BR>sqlstmt=sqlstmt & username & "&#039; and password=&#039;" & password &"&#039;"<BR>Set RS = conn.execute(SQLstmt)<BR>if rs.eof and rs.bof then<BR>&#039;incorrect login<BR>else <BR>&#039;correct<BR>end if

  3. #3
    Rainier Guest

    Default RE: Thanks Tonec, But....

    Thank Tonec for the quick reply, <BR>I&#039;m trying the code you suggested, but I&#039;f have problems reading how many "" you use sometimes.<BR><BR><BR>Regards Rainier<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts