Results 1 to 1 of 1

Thread: PHP Help :)

  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default PHP Help :)

    Well for some reason, this wont fetch the hotel from the database :S

    Heres the code.
    PHP Code:
    <?php
    $dbh
    =mysql_connect ("localhost""habbcr_spotlight""*********") or die
    (
    'I cannot connect to the database because: ' mysql_error());
    mysql_select_db ("habbcr_spotlight");
    $sql mysql_query("SELECT * FROM `habbos`  ORDER BY RAND() LIMIT 1");
    echo(
    "<table cellpadding=\"0\" cellspacing=\"0\" width=\"105\" height=\"135\">");
    while(
    $fetch mysql_fetch_array($sql))
    $habbo $fetch[habbo];
    $hotel $fetch[hotel];
    {
        if(
    $hotel == "com")
        {
            
    $display "(USA)";
        }
        if(
    $hotel == "co.uk")
        {
            
    $display "(UK)";
        }
        if(
    $hotel == "ca")
        {
            
    $display "(CA)";
        }
        if(
    $hotel == "com.au")
        {
            
    $display "(AU)";
        }
        if(
    $habbo == "****" || $habbo == "****" || $habbo == "****" || $habbo == "*******" || $habbo == "******")
        {
            
    $habbo "Bobba";
        }
    echo(
    "<tr>
            <td height=\"143\" width=\"105\">
            <img border=\"0\" src=\"http://habbcrazy.net/spotlight/
    $hotel/$habbo\" width=\"105\" height=\"143\"></td>
        </tr>
        <tr>
            <td><span style=\"font-size:11px;font-family: Verdana, Arial, Helvetica, sans-serif; font-color:#FFFFFF;font-weight:bold;\">
    $habbo $display</span></td>
        </tr>"
    );
    }
    echo(
    "</table>");
    ?>
    And yes, I do have a hotel field, and yes it has infomation in.
    Last edited by Moh; 01-03-2008 at 04:24 PM.

Posting Permissions

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