-
June 14th, 2012, 04:35 AM
#1
how to open tabs ?
Hello,
i have a login form , and another form with 2 tabs , if the user is admin ( compared with the database ) i want the two tabs to open , if not only on tab !
this is my code so far and its not working ?
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Connections As New MySqlConnection(" server=myserver;user id = root;password=;database=ilan;")
Dim cmd As MySqlCommand = New MySqlCommand("SELECT * FROM users WHERE username = '" & TextBox1.Text & "' AND password = '" & TextBox2.Text & "' ", Connections)
Connections.Open()
Dim sdr As MySqlDataReader = cmd.ExecuteReader()
' If the record can be queried, Pass verification and open another form.
If (sdr.Read() = True) Then
If sdr.Item("lvl") = "1" Then
' what to put here ??????
Else
End If
Else
MessageBox.Show("invalid username or password !")
End If
End Sub
End Class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|