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!


Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default OH usersystem problems! Help!

    Ok, I have done everything that it says, the sql, all the config files and when I go to login with the username: Admin and Pass: changeme like it says on mysite.com/usersystem/login.php, enter all the things.

    The error below comes up! Help, I have opened login.php in dreamweaver and looked at like 33 but nothing is wrong - I THINK. Anyway I've posted line 33 after the error.
    Code:
     
     
    Warning: mysql_query() [function.mysql-query]: Access denied for user 'cowly1a'@'localhost' (using password: NO) in /home/cowly1a/public_html/usersystem/login.php on line 33
     
    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/cowly1a/public_html/usersystem/login.php on line 33
    Access denied for user 'cowly1a'@'localhost' (using password: NO)
    Code:
     
     
    $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  2. #2
    Join Date
    Nov 2006
    Location
    Doncaster, UK
    Posts
    1,700
    Tokens
    0

    Latest Awards:

    Default

    Straight forward.

    Your MySQL details arn't right.

    Make sure they are.
    unitedstates,canada,mexico,panama,haiti,jamaica,pe ru,republicdominian,cuba,caribbean,greenland and el salvadour too.
    puertorica,colombia,venezuela,honduras,guyana and still, guatamala,bolivia then argentina and ecuador,chile,brazil.
    costarica,belize,nicaragua,bermuda,bahamas,tobago, sanjuan,paraguary,uruguay,suriname,frenchguiana,ba rbados and guan.
    norway and sweden and iceland and finland and germany now one piece, switzerland,austrira,czechoslovakia,italy,turkey and greece.



  3. #3
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Hi netik, in what file, that file I just posted or somewhere else?
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  4. #4
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default

    Yeah, the names aren't right are they?

  5. #5
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Ok, the whole script of that page is, can you please find where I need to put my sql details in, + rep to you both anyway for helping.
    Code:
     
     
    <?  
    ob_start();  
    // allows you to use cookies.  
    if (!$logged[username])  
    {  
    if (!$_POST[login])  
    {  
    echo("  
    <center><form method=\"POST\">  
    <table>  
    <tr>  
    <td align=\"center\">  
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\">  
    </td>  
    </tr>  
    <tr>  
    <td align=\"center\">  
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\">  
    </td></tr><tr>  
    <td align=\"center\">  
    <input type=\"submit\" name=\"login\" value=\"Login\">  
    </td></tr><tr>  
    <td align=\"center\">  
    <a href=\"register.php\" target=\"middle\">Register Here</a>  
    </td> 
    </tr></table></form></center>");  
     }  
    if ($_POST[login]) {  
    // the form has been submitted.  We continue...  
    $username=$_POST['username'];  
    $password = md5($_POST[password]);  
    // the above lines set variables with the submitted information.    
    $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());  
    $data = mysql_fetch_array($info);  
    if($data[password] != $password) {  
    // the password was not the user's password!  
    echo "<meta http-equiv=\"Refresh\" content=\"2; URL=login.php\"/><center>Incorrect username or password!<br><br>Please Wait</center>";  
    }else{  
    // the password was right!  
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error()); 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());  
    $user = mysql_fetch_array($query);  
    $date =  date("j F  G : i"); 
    if($user[level] == 11){ 
    mysql_query("INSERT INTO `modlogins` (`id` , `description` ) VALUES (NULL , '$user[username] :::: $date')"); 
    } 
    // gets the user's information  
    setcookie("id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("pass", $user[password],time()+(60*60*24*5), "/", ""); 
    mysql_query("INSERT INTO `logins` (`id`, `username` , `description` ) VALUES (NULL , '$user[username]' , '$date')"); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password. 
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=login.php\"/><center>Thank You! You will be redirected</center>");  
    // modify the above line...add in your site url instead of yoursite.com  
    }  
    }  
    }  
    else  
    { 
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error());    
    $new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'");  
    $new = mysql_num_rows($new); 
    $pms = mysql_query("select * from pmessages where touser = '$logged[username]'");  
    $pms = mysql_num_rows($pms);  
    $rquery = mysql_query("SELECT * FROM cfh"); # Queries The Call For Help Messages  
    while($m=mysql_fetch_array($rquery)) # Displays Them All In Order 
    // we now display the user controls. 
    if($logged[username] && $logged[level] == 0 ){ 
    echo "<p>Sorry, you are banned. And therefore cannot view this page!</p><p>To have the ban lifted, email - and we will look into the case.</p>"; 
    } 
    if($logged[username] && $logged[level] >= 1) 
    { 
    echo ("<p>Welcome <span class='$logged[level]'><b>$logged[username]</b></span>!<br>
    - <a href=\"select_badge.php\" target=\"middle\">Set Display Badge</a><br /> 
    - <a href=\"messages.php\" target=\"middle\">Message Center</a> ");
    include("new.php");
    echo("<br /> 
    - <a href=\"members.php\" target=\"middle\">Members List</a><br /> 
    - <a href=\"values_1.php\" target=\"middle\">Rare Values</a><br /> 
    - <a href=\"badges.php\" target=\"middle\">Badges List</a><br /> 
    - <a href=\"rooms.php\" target=\"middle\">Chatrooms</a><br /> 
    - <a href=\"contact.php\" target=\"middle\">Help Tool</a><br /> 
    - <a href=\"logout.php\" target=\"login\">Logout</a><br /> "); 
    if($logged[username] && $logged[level] == 12) 
    echo "- <a href=\"admin/index.php\" target=\"middle\">Admin Panel</a><br/>"; 
    if($logged[username] && $logged[level] == 11 || $logged[level] == 12) 
    echo "- <a href=\"mod/index.php\" target=\"middle\">Mod Panel</a><br />";  
    if($logged[username] && $logged[level] == 9 || $logged[level] == 12) 
    echo "- <a href=\"managers/index.php\" target=\"middle\">Managers Panel</a><br />";  
    if($logged[username] && $logged[level] == 10 || $logged[level] == 12) 
    echo "- <a href=\"support/index.php\" target=\"middle\">Player Support</a><br />";  
    }  
    } 
    ?>
    <html> 
    <head> 
    <title>Home</title> 
    <style type="text/css"> 
    a { 
    font-size: 10px; 
    color: #000000; 
    } 
    a:link { 
    text-decoration: none; 
    color: #000000; 
    } 
    a:visited { 
    text-decoration: none; 
    color: #000000; 
    } 
    a:hover { 
    text-decoration: underline; 
    color: #000000; 
    } 
    a:active { 
    text-decoration: none; 
    color: #000000; 
    } 
    body,td,th,p { 
    font-family: Verdana; 
    font-size: 10px; 
    color: #000000; 
    } 
    .12 { color: red; } 
    .11 { color: navy; } 
    .10 { color: ; } 
    .9 { color: darkorchid; } 
    .8 { color: darkorchid; } 
    .7 { color: darkorchid; } 
    .6 { color: darkorchid; } 
    .5 { color: green; } 
    .4 { color: green; } 
    .3 { color: green; } 
    .2 { color: green; } 
    .1 { color: black; } 
    input { 
        font-family: Tahoma, Arial; 
        font-size: 8pt; 
        font-weight: bold; 
        width: 100; 
        color: #000000; 
        background-color: #FFFFFF; 
        border: 1px solid #000000; 
    } 
    select { 
        background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    textarea { 
    background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    </style> 
    <meta http-equiv=\"Refresh\" content=\"30; URL=login.php\"/>
    </head> 
    <body bgcolor="transparent"> 
    </body> 
    </html>
    <?
    if ($logged[banned] == 'banned'){
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=banned.php\"/>");
    }
    ?>
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  6. #6
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default ..

    HTML Code:
    
    <?  
    ob_start();  
    // allows you to use cookies.  
    if (!$logged[username])  
    {  
    if (!$_POST[login])  
    {  
    echo("  
    <center><form method=\"POST\">  
    <table>  
    <tr>  
    <td align=\"center\">  
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\">  
    </td>  
    </tr>  
    <tr>  
    <td align=\"center\">  
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\">  
    </td></tr><tr>  
    <td align=\"center\">  
    <input type=\"submit\" name=\"login\" value=\"Login\">  
    </td></tr><tr>  
    <td align=\"center\">  
    <a href=\"register.php\" target=\"middle\">Register Here</a>  
    </td> 
    </tr></table></form></center>");  
    }  
    if ($_POST[login]) {  
    // the form has been submitted.  We continue...  
    $username=$_POST['username'];  
    $password = md5($_POST[password]);  
    // the above lines set variables with the submitted information.    
    $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());  
    $data = mysql_fetch_array($info);  
    if($data[password] != $password) {  
    // the password was not the user's password!  
    echo "<meta http-equiv=\"Refresh\" content=\"2; URL=login.php\"/><center>Incorrect username or password!<br><br>Please Wait</center>";  
    }else{  
    // the password was right!  
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error()); 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());  
    $user = mysql_fetch_array($query);  
    $date =  date("j F  G : i"); 
    if($user[level] == 11){ 
    mysql_query("INSERT INTO `modlogins` (`id` , `description` ) VALUES (NULL , '$user[username] :::: $date')"); 
    } 
    // gets the user's information  
    setcookie("id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("pass", $user[password],time()+(60*60*24*5), "/", ""); 
    mysql_query("INSERT INTO `logins` (`id`, `username` , `description` ) VALUES (NULL , '$user[username]' , '$date')"); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password. 
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=/login.php"/><center>Thank You! You will be redirected</center>");  
    // modify the above line...add in your site url instead of yoursite.com  
    }  
    }  
    }  
    else  
    { 
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error());    
    $new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'");  
    $new = mysql_num_rows($new); 
    $pms = mysql_query("select * from pmessages where touser = '$logged[username]'");  
    $pms = mysql_num_rows($pms);  
    $rquery = mysql_query("SELECT * FROM cfh"); # Queries The Call For Help Messages  
    while($m=mysql_fetch_array($rquery)) # Displays Them All In Order 
    // we now display the user controls. 
    if($logged[username] && $logged[level] == 0 ){ 
    echo "<p>Sorry, you are banned. And therefore cannot view this page!</p><p>To have the ban lifted, email - and we will look into the case.</p>"; 
    } 
    if($logged[username] && $logged[level] >= 1) 
    { 
    echo ("<p>Welcome <span class='$logged[level]'><b>$logged[username]</b></span>!<br>
    - <a href=\"select_badge.php\" target=\"middle\">Set Display Badge</a><br /> 
    - <a href=\"messages.php\" target=\"middle\">Message Center</a> ");
    include("new.php");
    echo("<br /> 
    - <a href=\"members.php\" target=\"middle\">Members List</a><br /> 
    - <a href=\"values_1.php\" target=\"middle\">Rare Values</a><br /> 
    - <a href=\"badges.php\" target=\"middle\">Badges List</a><br /> 
    - <a href=\"rooms.php\" target=\"middle\">Chatrooms</a><br /> 
    - <a href=\"contact.php\" target=\"middle\">Help Tool</a><br /> 
    - <a href=\"logout.php\" target=\"login\">Logout</a><br /> "); 
    if($logged[username] && $logged[level] == 12) 
    echo "- <a href=\"admin/index.php\" target=\"middle\">Admin Panel</a><br/>"; 
    if($logged[username] && $logged[level] == 11 || $logged[level] == 12) 
    echo "- <a href=\"mod/index.php\" target=\"middle\">Mod Panel</a><br />";  
    if($logged[username] && $logged[level] == 9 || $logged[level] == 12) 
    echo "- <a href=\"managers/index.php\" target=\"middle\">Managers Panel</a><br />";  
    if($logged[username] && $logged[level] == 10 || $logged[level] == 12) 
    echo "- <a href=\"support/index.php\" target=\"middle\">Player Support</a><br />";  
    }  
    } 
    ?>
    <html> 
    <head> 
    <title>Home</title> 
    <style type="text/css"> 
    a { 
    font-size: 10px; 
    color: #000000; 
    } 
    a:link { 
    text-decoration: none; 
    color: #000000; 
    } 
    a:visited { 
    text-decoration: none; 
    color: #000000; 
    } 
    a:hover { 
    text-decoration: underline; 
    color: #000000; 
    } 
    a:active { 
    text-decoration: none; 
    color: #000000; 
    } 
    body,td,th,p { 
    font-family: Verdana; 
    font-size: 10px; 
    color: #000000; 
    } 
    .12 { color: red; } 
    .11 { color: navy; } 
    .10 { color: ; } 
    .9 { color: darkorchid; } 
    .8 { color: darkorchid; } 
    .7 { color: darkorchid; } 
    .6 { color: darkorchid; } 
    .5 { color: green; } 
    .4 { color: green; } 
    .3 { color: green; } 
    .2 { color: green; } 
    .1 { color: black; } 
    input { 
        font-family: Tahoma, Arial; 
        font-size: 8pt; 
        font-weight: bold; 
        width: 100; 
        color: #000000; 
        background-color: #FFFFFF; 
        border: 1px solid #000000; 
    } 
    select { 
        background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    textarea { 
    background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    </style> 
    <meta http-equiv=\"Refresh\" content=\"30; URL=login.php\"/>
    </head> 
    <body bgcolor="transparent"> 
    </body> 
    </html>
    <?
    if ($logged[banned] == 'banned'){
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=banned.php\"/>");
    }
    ?>
    Try that

  7. #7
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    This appears , Sorryu but I am quite new to php and sql.

    Code:
     
    Parse error: syntax error, unexpected '>' in /home/cowly1a/public_html/usersystem/login.php on line 52
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  8. #8
    Join Date
    Nov 2006
    Location
    Doncaster, UK
    Posts
    1,700
    Tokens
    0

    Latest Awards:

    Default

    Have you read the documentation file?

    Read that.

    Edit all config.php files and no_banconfig.php with your MySQL details.
    unitedstates,canada,mexico,panama,haiti,jamaica,pe ru,republicdominian,cuba,caribbean,greenland and el salvadour too.
    puertorica,colombia,venezuela,honduras,guyana and still, guatamala,bolivia then argentina and ecuador,chile,brazil.
    costarica,belize,nicaragua,bermuda,bahamas,tobago, sanjuan,paraguary,uruguay,suriname,frenchguiana,ba rbados and guan.
    norway and sweden and iceland and finland and germany now one piece, switzerland,austrira,czechoslovakia,italy,turkey and greece.



  9. #9
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default

    Nothing is wrong with the login.php file it is as Netik pointed out your mysql details.

    When you put in the username and database name make sure you put CPUSERNAME_ at the front. CPUSERNAME being the username you use to login to your cpanel.

  10. #10
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Yes that's done, I double checked just then.
    Edit: they are all: cowly1a_Cowly

    cowly1a being the actual acces username and cowly the other username
    Last edited by Jahova; 27-11-2006 at 05:37 PM.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


Page 1 of 2 12 LastLast

Posting Permissions

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