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 7 of 7

Thread: Errors :(

  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default Errors :(

    Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www/include/database.php on line 207

    Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www/include/database.php on line 218
    207:
    $this->num_active_users = mysql_numrows($result);
    218:
    $this->num_active_guests = mysql_numrows($result);

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  2. #2
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    try backing up the file then deleting them 2 lines sometimes works for me
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  3. #3
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    That won't work.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  4. #4
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    does for me sometimes?

    what is this for?
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  5. #5
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    The function is mysql_num_rows not mysql_numrows...

  6. #6
    Join Date
    Jan 2007
    Location
    Canada eh?
    Posts
    766
    Tokens
    75

    Default

    Quote Originally Posted by Invent View Post
    The function is mysql_num_rows not mysql_numrows...
    By the looks of things he's using classes therefore it might be the correct spelling (he may have made his own function and spelt it that way).... look into that perhaps? If that is not infact the problem then try turning on mysql errors or make your queries/num rows look like this:

    PHP Code:
    <?php
    $test 
    mysql_query("SELECT * FROM `db`") or die(mysql_error());
    $test2 mysql_num_rows($test) or die(mysql_error());
    ?>
    That should print out the error if it is actually a problem with your query and not the rest of your code

  7. #7
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    How come since i fixed the error the form no longer shows..
    http://206.123.88.22/register.php
    PHP Code:
    <?
    include("include/session.php");
    ?>

    <html>
    <title>Registration Page</title>
    <body>

    <?
    if($session->logged_in){
       echo 
    "<h1>Registered</h1>";
       echo 
    "<p>We're sorry <b>$session->username</b>, but you've already registered. "
           
    ."</p>";
    }
    else if(isset(
    $_SESSION['regsuccess'])){
       
    /* Registration was successful */
       
    if($_SESSION['regsuccess']){
          echo 
    "<h1>Registered!</h1>";
          echo 
    "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, "
              
    ."</p>";
       }
       
    /* Registration failed */
       
    else{
          echo 
    "<h1>Registration Failed</h1>";
          echo 
    "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
              
    ."could not be completed.<br>Please try again at a later time.</p>";
       }
       unset(
    $_SESSION['regsuccess']);
       unset(
    $_SESSION['reguname']);
    }
    else{
    ?>

    <h1>Register</h1>
    <?
    if($form->num_errors 0){
       echo 
    "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
    }
    ?>
    <form action="process.php" method="POST">
    <table align="left" border="0" cellspacing="0" cellpadding="3">
    <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
    <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
    <tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>
    <tr><td colspan="2" align="right">
    <input type="hidden" name="subjoin" value="1">
    <input type="submit" value="Join!"></td></tr>
    <tr><td colspan="2" align="left"><a href="index.php">Back to Main</a></td></tr>
    </table>
    </form>
    <?
    }
    ?>

    </body>
    </html>

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Posting Permissions

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