Visual basic
Dim user As String, password As String
Private Sub cmdSubmit_Click() Open "userpassw.TXT" For Input As #1 Input #1, user, password Call Login Input #1, user, password Call Login Input #1, user, password End Sub
Private Sub Login() Dim userpass As String If txtUser.Text = user Then If txtPass.Text = password Then Else Else End If End If End Sub
ya i need some help plz its not the whole code but its what i have so far..
Dim user As String, password As String
Private Sub cmdSubmit_Click() Open "userpassw.TXT" For Input As #1 Input #1, user, password Call Login Input #1, user, password Call Login Input #1, user, password End Sub
Private Sub Login() Dim userpass As String If txtUser.Text = user Then If txtPass.Text = password Then Else Else End If End If End Sub
ya i need some help plz its not the whole code but its what i have so far..
Well, if you're using VB.Net, I would suggest using the IO.Filestream object and a StreamReader to read from that file. If using VB6, then I think it would help more to know exactly what problem it's giving you. I'd have to say that your "nested" IF statements look rather warped if that's how they actually are in your program.
Here's a couple links that may help: http://www.aivosto.com/visdev/fso.html http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingsequentialfileaccess.asp