title: C# Login System Expiration Date
body: <p>This is the code i'm using for c# mysql login system </p>
  
  <pre><code>    try
      {
          MySqlConnection connection = new MySqlConnection("Server=localhost; database=member; UID=root; Pwd=");
          MySqlCommand cmd = new MySqlCommand("SELECT * FROM member.member WHERE username='" + this.metroTextBox1.Text + "' AND password='" + this.metroTextBox2.Text + "' ;", connection);
          MySqlDataReader myReader;
          connection.Open();
          myReader = cmd.ExecuteReader();
          int count = 0;
          while (myReader.Read())
          {
              count = count + 1;
          }
          if (count == 1)
          {
              Form2 frm = new Form2();
              frm.username = metroTextBox1.Text;
              frm.Show();
              this.Visible = false;
          }
          else
          {
              MetroMessageBox.Show(this, "Incorrect login credentials. Failed to login!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
          }
      }
  </code></pre>
  
  <p>And this is my database 
  <a href="http://i.imgur.com/K831atR.png" rel="nofollow">http://i.imgur.com/K831atR.png</a></p>
  
  <p>Basically i want to block login if expirationdate passed. But i've no clue what to do.</p>