Note the login.php script on webserver is not vulnerable to SQLI attacks.
PHP Code
<?php
Dim result As String = WebClient.DownloadString("-censored-/login.php?username=" + TextBox1.Text + "&password=" + TextBox2.Text)
If result.Contains("Login.Success") Then
MessageBox.Show("Login successful.")
SaveDetails() (save details is a public function so it can be accessed on other forms apart from Form1, I used this for checking if the user is logged in on certain events. Incase the login form is somehow bypassed.)
Hide()
Form2.Show()
Else
If result = "Login.Failed" Then
MessageBox.Show("Failed to login.")
Else
MessageBox.Show("An Error Occured!")
End If
End If



