Validating the login interface credentials

i have created and stored the user registration details into the database.Now I have to validate those stored credentials with the credentials that user enters during the login process.Could any one help me like validating the details ?

  Discussion posts and replies are publicly visible

Parents Reply
  • Got you.

    Here is the way you can follow.

    1. Get username of logged in username by function loggedInuser() and store in one local variable.
    2. Use above local to query from DB via a query entity which takes input as username and query a row from DB and store it into another local variable
    3. Now the field where the user enters credentials is getting saved/store into other variables.
    4. So in the validation part of the field of "Username" and "Password", you can compare.
    5. if it matches then no msg to display else say username/password is wrong


    Or instead of validating at the field level, you can do validation at form label as well when a user hit on submit button


    Let me know if you are unclear anywhere

Children