How To Make A Simple Login System In C#

login form
Everyone knows what a login system is ! so i don't think any explanations are needed . i will come to the main thing , Today we are going to make a simple login system in c# .

You need two text boxes,two labels and two buttons.

Now make the controls look like this on form.form login
Now let's go for login button codes
   //if textbox1 text is admin and textbox2 text is 1234567
            if ((textBox1.Text == "admin") && (textBox2.Text == "1234567"))
            {
                //then show form2
                Form2 nextform = new Form2();
                nextform.ShowDialog();
            }
            else
            {
                //if username and password is incorrect show this message box
                MessageBox.Show("Username or Password Invalid");
            }
This is the code for button 2 which is a exit button
            Application.Exit();
Alright we are done ! I hope this is helpful !

How To Login And Logout With Session In PHP

this is a simple tutorial for beginners by the way this is also a good way to login and logout
lets make the index.php