I am trying to connect to a sql database and read from a table to determine if a username is valid upon a user entering in theirs. To just give you a background of the program:
1. The user needs to enter in their username and ID number. I already have a way to check if the ID is correct.
2. The username needs to match one that is in the sql database within a table. If not then it will display an error message.
If someone could show me how to connect to the database correctly then that would be great because the code I have been using has not been showing the results I need.
Also how to check if the username is correct based on the database table.