Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default What's wrong? ahh.

    Silence is the cleaning function..

    Any other method's of checking if a username already exists, in different casing, mine isn't working.

    PHP Code:

            $username 
    silence($_POST['username']);

            
    $query mysql_query"SELECT `username` FROM `userstorage` WHERE username = '$username'" );
            
    $checkname mysql_num_rows($query);
            if(
    $checkname 0){
            
            echo 
    'This username is currently in use!';  
            exit();
            
            }
            else { 
                echo 
    "Woops";
            } 

  2. #2
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Change the 0 to a 1..?

  3. #3
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    Change the 0 to a 1..?
    Still no.

  4. #4
    Join Date
    Jul 2005
    Location
    North Wales
    Posts
    4,233
    Tokens
    1,544

    Latest Awards:

    Default

    Will this work?

    PHP Code:
    $username silence($_POST["username"]);

    $result mysql_query("select username from userstorage where username='$username'");
    $count mysql_num_rows($result);
    if (
    $count == 1) {

        echo (
    "This username is currently in use!");

        exit();

    }

    else {
        
        echo(
    "What ever happends if the username is free...");



  5. #5
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    $username silence($_POST['username']);
    $query mysql_query("SELECT * FROM `userstorage` WHERE `username` = '$username'");
    $checkname mysql_num_rows($query);
    if(
    $checkname >= 1) {
    echp ("This username is currently in use!");
    exit();
    } else {
    echo (
    "Whoops!");

    Try that.

  6. #6
    Join Date
    Jul 2005
    Location
    North Wales
    Posts
    4,233
    Tokens
    1,544

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    PHP Code:
    $username silence($_POST['username']);
    $query mysql_query("SELECT * FROM `userstorage` WHERE `username` = '$username'");
    $checkname mysql_num_rows($query);
    if(
    $checkname >= 1) {
    echp ("This username is currently in use!");
    exit();
    } else {
    echo (
    "Whoops!");

    Try that.
    echp thats a new one

  7. #7
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    fixed.

    Thanks
    Last edited by Calon; 26-08-2008 at 07:07 PM.

  8. #8
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
            $username silence($_POST['username']);

            
    $query mysql_query"SELECT `username` FROM `userstorage` WHERE username = '$username'" );
            
    $checkname mysql_num_rows($query);
            if(
    $checkname === 1){
            
            echo 
    'This username is currently in use!';  
            exit();
            
            }
            else { 
                echo 
    "Woops";
            } 
    EDIT: oh allready fixed
    Lets set the stage on fire, and hollywood will be jealous.

  9. #9
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by redtom View Post
    echp thats a new one
    Ya' I heard it was some new kind of function for sending out printed data!

Posting Permissions

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