Password check prob

Results 1 to 3 of 3

Thread: Password check prob

  1. #1
    Renidea Guest

    Default Password check prob

    I&#039ve coded an asp log in page for user access to a system. My database connection is working, and I can successfully identify the user in the database using the entered name, but my password comparison is not working. The reason being is that the password field is a 15 character field, and not all passwords are 15 characters.<BR><BR>Example:<BR><BR>User: John<BR>Password: hello<BR><BR>In order to get the code to properly validate the password, John would have to enter "hello**********" (* designating a space bar entry) in order to log in. Ideally, he should only enter "hello".<BR><BR>Does anyone know how to get my if statement to ignore the empty characters in the SQL database? Or any other means of fixing the problem?

  2. #2
    Sathiya Guest

    Default RE: Password check prob

    Use Trim to remove the Spaces and compare. To be in Safe side use Rtrim and Ltrim . Ex:<BR><BR>If Trim(EnteredPassword) = Trim(PasswordfromTable) Then...

  3. #3
    Renidea Guest

    Default Thanks it worked :^D

    Just a note of thanks.

Posting Permissions

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