I have a table called users and in that table are usernames and passwords in my SQL database. How would I get it to work so if they type in the user name and password it will show them a message if they get there details correct. Basically how can I get it so if they type in there username and password it will do something?
Thanks, here is an example program of how it connects to my SQL database. I am fully aware about the username and password being shown. This is a test database for testing. Anyway any ideas?
program project1;
uses
sqldb, mysql56conn;
var
AConnection: TSQLConnector;
procedure CreateConnection;
begin
AConnection := TSQLConnector.Create(nil);
AConnection.ConnectorType := 'MySQL 5.6';
AConnection.Hostname := 'sql5.freemysqlhosting.net';
AConnection.DatabaseName := 'sql561707';
AConnection.UserName := 'sql561707';
AConnection.Password := 'dX3%eP3!';
end;
begin
CreateConnection;
AConnection.Open;
if Aconnection.Connected then
begin
writeln('Successful connect!');
readln
end
else
writeln('This is not possible, because if the connection failed, an exception should be raised, so this code would not be executed');
AConnection.Close;
AConnection.Free;
readln;
end.