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 12

Thread: PHP - Help

  1. #1
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default PHP - Help

    Can anyone tell me what is wrong with this?

    PHP Code:
    <?php if($info->rank =='Official Bliss Godfather'){
    "<b><font color=red>Official Bliss Godfather</font>"
    }
    ?>

  2. #2
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    Quote Originally Posted by Carbon View Post
    Can anyone tell me what is wrong with this?

    PHP Code:
    <?php if($info->rank =='Official Bliss Godfather'){
    "<b><font color=red>Official Bliss Godfather</font>"
    }
    ?>
    Well firstly could you tell us what errors you get? Also you need to define what $info is. Eg

    PHP Code:
    $info = new class(); 

  3. #3
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Add echo before "<b><font color=red>Official Bliss Godfather</font>"; to output it.

  4. #4
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    I dont get any errors.Just the rank isnt red.

  5. #5
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    <font color="red">

    Edit:

    If you use it in that snipped you'll need it like:
    <font color=\"red\">

  6. #6
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    <font color="red">
    Thanks Tom it worked. Rep+


    But now my rank is this.

    Rank: Official Bliss GodfatherOfficial Bliss Godfather

  7. #7
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Post the whole code, not just that snippet.

  8. #8
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    Post the whole code, not just that snippet.

    PHP Code:
                  <div align="right"><font color="grey"><b>Rank:</b></font></div>

                </div></td>

                <td width="25%"><div align="left">

    <?php if($info->rank =='Official Bliss Godfather'){
    echo
    "<b><font color=red>Official Bliss Godfather</font>"
    }
    ?> 


    <b><font color=white><?=$fetch->rank?></b></div></td>

  9. #9
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Why are you adding:
    PHP Code:
    <?php if($info->rank =='Official Bliss Godfather'){
    echo
    "<b><font color=red>Official Bliss Godfather</font>"
    }
    When

    PHP Code:
    <?=$fetch->rank?>
    Gets the rank for you?

    If you wanted to make it red then you could just change the html before the $fetch->rank.

  10. #10
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    Why are you adding:
    PHP Code:
    <?php if($info->rank =='Official Bliss Godfather'){
    echo
    "<b><font color=red>Official Bliss Godfather</font>"
    }
    When

    PHP Code:
    <?=$fetch->rank?>
    Gets the rank for you?

    If you wanted to make it red then you could just change the html before the $fetch->rank.
    I want all the other ranks white, but "Official Bliss Godfather" Red..

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
  •