Create a stored procedure in the MySQL database (if you have a version which supports procedures) which has input parameters for the username and password. Pass it the username and password and within the procedure have it check a table and see if the username and password exist in a single row. Something like this.
CREATE PROCEDURE MyProcedure
@UserName nvarchar(50),
@Password nvarchar(50)
AS
SELECT 1
FROM YourTable
WHERE UserName = @UserName
and Password = @Password
GO
Then if there is no record it’s not a valid account. If there is a record it is a valid account.
This page has come good info about using stored procedures.
Discuss This Question: