Topic awaiting preservation: User Registration Script... (Page 1 of 1) |
|
---|---|
Obsessive-Compulsive (I) Inmate From: Connecticut |
posted 01-26-2003 03:29
Hello, |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-26-2003 14:42
just a wild guess, but after you explode() there might be some whitespace around $name... so try to replace strtolower($name) with strtolower(trim($name)) |
Obsessive-Compulsive (I) Inmate From: Connecticut |
posted 01-26-2003 17:52
Okay, that did not work, but ive got it. I just put all the names in an array and used preg_grep() to check if the $user exists in the array. Heres the code: |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 01-26-2003 19:37
You shouldn't need the preg_grep (since you're not using any of the features of a reg_exp) you can just use in_array; |
Obsessive-Compulsive (I) Inmate From: Connecticut |
posted 01-26-2003 20:33
yeah, but i wanted it to be case-insensitive. I found that little snippet in the php.net manual for in_array i believe. So i gave it a try and it worked out great. quote:
|