string user = textBox1.Text; string pasw = textBox2.Text; MySqlConnection baglanti = new MySqlConnection("Server=localhost;Database=emlak;Uid=root;Pwd='';"); MySqlCommand cmd = new MySqlCommand(); baglanti.Open(); cmd.Connection = baglanti; cmd.CommandText = "SELECT * FROM kayitol where kullanici_adi='"+ textBox1.Text+"'AND kullanici_sifre="; MySqlDataReader dr = cmd.ExecuteReader(); if (label6.Text == textBox3.Text) { if (dr.Read()) { MessageBox.Show("Giriş Başarılı.."); musteriform.Show(); this.Hide(); } else { MessageBox.Show("Kullanıcı adı ya da şifre yanlış"); } } else { MessageBox.Show("Doğrulama Kodu Hatalı"); }