Ok i got a form called Form2, this is the form where you should see every thing and update everything out of a phpmyadmin database.
Then a second form that calls loginFrm, thats activated from Form2.
The only code i need or solution is if you login onto the loginform it should keep the status en can be called from the FORM2 if the login is TRUE or FALSE.
loginFrm.cs code:
private void connectBtn_Click(object sender, EventArgs e)
{
MySqlConnection sconn = new MySqlConnection("User ID=root;Password=;Initial Catalog=cmstt;Data Source=localhost");
sconn.Open();
DataSet ds = new DataSet();
MySqlDataAdapter da = new MySqlDataAdapter("select * from users where email ='" + UsrName.Text + "' and pass='" + PassWrd.Text + "'", sconn);
da.Fill(ds);
int count = ds.Tables[0].Rows.Count;
if (count == 0)
{
MessageBox.Show("Invalid UserID/Password");
}
else
{
this.Visible = false;
MessageBox.Show("gelukt");
}
sconn.Close();
}
If you give me help would you want to be clear about where i have put which code?
Thanks
Well in your Form2 which brings up the loginFrm, you could prompt like this:
In your login form: