boxhead283
Aug 30th, 2007, 04:04 AM
Hey guys,
I currently have a login system made already. It works but if I add more than 1 login or password it wont work correcty. I tried making something with out a sql data base. I will post the code below.
This is my username and password. Text1 = Username and Text2 = Password
Private Sub cmdLogin_Click()
Dim intU As Integer
If Text1 = "" Then Exit Sub
For intU = 1 To uCur
If U(intU, 2) = Text1 Then Exit For
Next intU
If intU > uCur Then
Else
End If
If Text2 = "" Then Exit Sub
If U(intU, 1) <> (Text2) Then MsgBox "ACCESS DENIED!": Exit Sub
Label1.Visible = True
End Sub
Now the way I have the code writen it reads off 1 file. I cant point it to my site. The code to know what parts of the db file to read off of is below here.
Private Sub Form_Load()
Label1.Visible = False
Dim Data As String
Data = Inet1.OpenURL("http://www.site.net/Data.db")
If Data <> "" Then
Open Data For Input As #1
For uCur = 1 To uMax
If EOF(1) Then Exit For
Input #1, U(uCur, 1), U(uCur, 2)
Next uCur
uCur = uCur - 1:
Close #1
End If
End Sub
In the data base file, here is a example of what it looks like.
"t551","John"
"62afdr4","Chris"
I've tried so many other ways but the way I have shown these codes above, I compile and get a error of ' File Not Found - Runtime error 53'
If I point it to a location on my computer the code works.
Does anyone know how I can get this all to work correctly?
I currently have a login system made already. It works but if I add more than 1 login or password it wont work correcty. I tried making something with out a sql data base. I will post the code below.
This is my username and password. Text1 = Username and Text2 = Password
Private Sub cmdLogin_Click()
Dim intU As Integer
If Text1 = "" Then Exit Sub
For intU = 1 To uCur
If U(intU, 2) = Text1 Then Exit For
Next intU
If intU > uCur Then
Else
End If
If Text2 = "" Then Exit Sub
If U(intU, 1) <> (Text2) Then MsgBox "ACCESS DENIED!": Exit Sub
Label1.Visible = True
End Sub
Now the way I have the code writen it reads off 1 file. I cant point it to my site. The code to know what parts of the db file to read off of is below here.
Private Sub Form_Load()
Label1.Visible = False
Dim Data As String
Data = Inet1.OpenURL("http://www.site.net/Data.db")
If Data <> "" Then
Open Data For Input As #1
For uCur = 1 To uMax
If EOF(1) Then Exit For
Input #1, U(uCur, 1), U(uCur, 2)
Next uCur
uCur = uCur - 1:
Close #1
End If
End Sub
In the data base file, here is a example of what it looks like.
"t551","John"
"62afdr4","Chris"
I've tried so many other ways but the way I have shown these codes above, I compile and get a error of ' File Not Found - Runtime error 53'
If I point it to a location on my computer the code works.
Does anyone know how I can get this all to work correctly?