Advertisement
Guest User

Untitled

a guest
Apr 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Public Class Login
  2.  
  3. Dim wClient As New System.Net.WebClient
  4. Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
  5.  
  6. End Sub
  7.  
  8. Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  9. Dim results As String = wClient.DownloadString("http://yourdomain.esy.es/Login/handler.php?action=register&username=" + TextBox1.Text + "&password=" + TextBox2.Text)
  10.  
  11. If results = "1" Then
  12.  
  13. MessageBox.Show("Successfully Registered!")
  14.  
  15. ElseIf results = "0" Then
  16.  
  17. MessageBox.Show("There Is An Error, Please Try Again")
  18.  
  19. End If
  20. End Sub
  21.  
  22. Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
  23.  
  24. Dim results As String = wClient.DownloadString("http://yourdomain.esy.es/Login/handler.php?action=login&username=" + TextBox1.Text + "&password=" + TextBox2.Text)
  25.  
  26. If results = "1" Then
  27.  
  28. MessageBox.Show("Successfully Logged In!")
  29.  
  30. Form1.Show()
  31. Me.Hide()
  32.  
  33.  
  34.  
  35. ElseIf results = "0" Then
  36.  
  37. MessageBox.Show("Invalid Login Info", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  38.  
  39. End If
  40.  
  41. End Sub
  42. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement