Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008

    Unanswered: Need A little help with User Varify script

    Well here's the scoop:
    I'm sort of new at PHP, but I understand the basics. I got my registration form almost complete at

    The only problem I'm having is checking the username to see if it's already in use. I have some code that works about 70% for the purpose I need. It only catches the username if the case is exactly the same.

    Example: there's a username called Spence, and nobody else can make one called "Spence", but u can still make an account called SPENCE, or spence, or sPEnCe, etc..

    I've seen other website with this problem as well, but I don't ever want to see it on my site.

    here's the code I use right now for username checker:

    PHP Code:
    //check to see if username is already in use
    if($user1=="$username") {
    $baduserreason1="Username is already in use. Please enter a different username.";
    $user1 - are the usernames loaded from the database.
    $username - is the name entered in the form.

    What I need specificly is the code the turns any text into ALL CAPS. Then I can check it properly.

    Edit: Thanks healdem, this is my new working code
    PHP Code:
    //check to see if username is already in use
    if($user1 == $user2) {
    $baduserreason1="Username is already in use. Please enter a different username.";
      else {
    Last edited by s-p-n; 05-27-08 at 17:00.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    is probably worth a look
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts