string username = textBox1.Text; string pass = textBox2.Text; cmd = new SqlCommand("select * from the user_login where username ='" + username + "'", con); dr = cmd.ExecuteReader(); while(dr.Read()) { if((username==dr[0].ToString())&&(pass==dr[1].ToString())) { string acc=dr[2].ToString(); Class1.access=acc; Form2 mf = new Form2(); mf.Show(); } else { MessageBox.Show("Unauthorized access"); } con.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)