I'm trying to make this login but I'm having some trouble. This is my code so far. I put this code into the login button:
Private Sub loginbutton_Click(sender As Object, e As EventArgs) Handles loginbutton.Click
1 Dim InputUser As String
2 Dim InputPass As String
3 Dim Correctu As String
4 Dim Correctp As String
5 InputUser = txtLogin.Text
6 InputPass = txtLoginPassword.Text
7 Correctu = "Daniel"
8 Correctp = "apple"
9 If InputUser = Correctu Then islogincorrect.Text = "Login is Correct!"
10 If InputPass = Correctp Then islogincorrect.Text = "Login is Correct!" Else
11 If InputUser <> Correctu Then
12 islogincorrect.Text = "Login is Not Correct!"
13 End If
14
15 End Sub
Im trying to make it so that if the username and password match what they are supposed to be, then it will say login is correct, and if not display login is not correct. InputUser is the username box. InputPass is the password box. The Correctu is just saying what the correct username should be and Correctp is saying what the correct password should be. I'm having trouble somewhere on lines 9 down saying that if the username and password are what they are supposed to be, it would say login correct but thats not working. So if sombody could please help me that would be great. Thanks!
Private Sub loginbutton_Click(sender As Object, e As EventArgs) Handles loginbutton.Click
1 Dim InputUser As String
2 Dim InputPass As String
3 Dim Correctu As String
4 Dim Correctp As String
5 InputUser = txtLogin.Text
6 InputPass = txtLoginPassword.Text
7 Correctu = "Daniel"
8 Correctp = "apple"
9 If InputUser = Correctu Then islogincorrect.Text = "Login is Correct!"
10 If InputPass = Correctp Then islogincorrect.Text = "Login is Correct!" Else
11 If InputUser <> Correctu Then
12 islogincorrect.Text = "Login is Not Correct!"
13 End If
14
15 End Sub
Im trying to make it so that if the username and password match what they are supposed to be, then it will say login is correct, and if not display login is not correct. InputUser is the username box. InputPass is the password box. The Correctu is just saying what the correct username should be and Correctp is saying what the correct password should be. I'm having trouble somewhere on lines 9 down saying that if the username and password are what they are supposed to be, it would say login correct but thats not working. So if sombody could please help me that would be great. Thanks!