Sorry for the not-very descriptive title... but i was unsure of exactly what to call it. Now, the problem:
For a login Screen, i am using the following code:
VB Code:
Dim dataArray() As String Dim iValidUser As Boolean dataArray = userName.Split(Chr(45)) If UCase(dataArray(0)) = "ADMIN" And LCase(dataArray(1)) = "1234" Then iValidUser = True ElseIf UCase(dataArray(0)) = "ADMIN" And LCase(dataArray(1)) <> "1234" Then iValidUser = False 'ElseIf UCase(dataArray(0)) <> "ADMIN" And [[[LCase(dataArray(1)) AND THE SPLITTER DO NOT EXIST]]] Then Else iValidUser = True End If
Now, I want the admins to be able to login as "admin-password" and the users to be able to log in as "user"
As it is now, when i log in as a user, say "bob" it doesnt work, because there is no chr(45)... which is "-". How do i get it to only check for a split char if the start of the name is "admin"?
I appreciate any help offered
Shift




Reply With Quote