|
-
Nov 21st, 2002, 11:24 PM
#1
Thread Starter
Lively Member
.Split Question*RESOLVED*
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
Last edited by nightshift; Nov 22nd, 2002 at 12:11 AM.
-
Nov 22nd, 2002, 12:10 AM
#2
Thread Starter
Lively Member
nevermind... got around it...
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
|