Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub SaveChanges_Click(sender As System.Object, e As System.EventArgs) Handles SaveChanges.Click
- Dim con As New MySqlConnection("host = localhost; username = root; password = 1234; database = logindb")
- Dim cmd As New MySqlCommand
- con.Open()
- cmd.Connection = con
- cmd.CommandText = "UPDATE login SET username = '" & ChangeUsername.Text & "' and password = '" & ChangePassword.Text & "' and Security_Question1 ='" & ChangeSecQue1.Text & "' and Security_Question2 = '" & ChangeSecQue2.Text & "' and Security_Answer1 = '" & ChangeSecAns1.Text & "' and Security_Answer2 = '" & ChangeSecAns2.Text & "' "
- cmd.ExecuteNonQuery()
- MsgBox("Saved Changes!")
- con.Close()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement