Mysql passing Login data to another form
Posted: 10.09.2014, 17:45
i have asked this question on Stackoverflow but with no luck with answers , here is my question
down vote favorite
i have created 2 forms A login form & A main form i successfully logged in To the main form
here is the code that i use to login
i retrieve and validate logins from a unit class wich is Tloginclass ,,
but now how to i set the data for each user logged in to the main form ?
i try somthing like this after login
but this is not logical because this showing only text how the application know the differents between user who loggedin like there is bob and martin and james ,etc are online now and read there user names ? any idea about this iam trying to understand the logic of this concept , how to implement the tracking of online users. Second is how to enable/disable some functionality of application based on the specific user.
down vote favorite
i have created 2 forms A login form & A main form i successfully logged in To the main form
here is the code that i use to login
Code: Select all
SQL := Tloginclass.Create;
try
SQL.Login:= trim(Usrnm.Text);
SQL.passwd := trim(passwd.Text);
if SQl.logins then
begin
LoginSuccess := True;
end
but now how to i set the data for each user logged in to the main form ?
i try somthing like this after login
Code: Select all
//this is for list users
Mainform.list.Items.Add(SQL.Login);