title: C# MySql Login Admin panel
body: <p>I have a project and that project has a login part. Users will be able to login with their own accounts and will be transferred to a different Form. But I want to login to the admin panel, I don't know how to login. When I type name=&quot;admin&quot; password=&quot;admin123&quot; from the same login, it will switch to the admin form. Admin account in the same table</p>
  <pre><code> private void jImageButton2_Click(object sender, EventArgs e)
      {
  
  
          string user = textBox1.Text;
          string pasw = textBox2.Text;
  
          MySqlConnection baglanti = new MySqlConnection(&quot;Server=localhost;Database=emlak;Uid=root;Pwd='';&quot;);
          MySqlCommand cmd = new MySqlCommand();
          baglanti.Open();
  
          cmd.Connection = baglanti;
          string veri = cmd.CommandText = &quot;SELECT kullanici_adi FROM kayitol WHERE ID='32'&quot;; // admin name
          string veri2 = cmd.CommandText = &quot;SELECT kullanici_sifre FROM kayitol WHERE ID= '32'&quot;;//admin password
          cmd.CommandText = &quot;SELECT * FROM kayitol where kullanici_adi='&quot; + textBox1.Text + &quot;' AND kullanici_sifre='&quot; + textBox2.Text + &quot;'&quot;; //UserLogin
  
          MySqlDataReader dr = cmd.ExecuteReader();
          if (label6.Text == textBox3.Text) //  verification
          {
              if (dr.Read())
              {
                  MessageBox.Show(&quot;Giriş Başarılı..&quot;);// Login True
                  musteriform.Show();
                  this.Hide();
              }
              else
              {
                  MessageBox.Show(&quot;Kullanıcı adı ya da şifre yanlış&quot;); // Login false
              }
              if (user == veri&amp;&amp; pasw==veri2)
              {
                  Form2 frm2 = new Form2(this);
                  frm2.Show();
              }
          }
          else
          {
              MessageBox.Show(&quot;Doğrulama Kodu Hatalı&quot;); // False verification
          }
  </code></pre>
  <p>The user whose ID is equal to 32 is the admin user. When you enter the password and name of the user admin account correctly, it will be transferred to the admin form.</p>
  <p>Sorry if I didn't explain myself fully. I need help by typing from google translate</p>