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 4 of 4
  1. #1
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default Quick PHP [HELP]

    Ok i have my code, but how do i do that "elseif" thing.

    Here is my code..

    PHP Code:
    <?php if($fetch->ghostmode == "1"){ echo" Ghostmode[<font color="green">ON</font>]";} ?>
    But i want it so i can elseif ghostmode == "0" and then my text, any help?

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

    Latest Awards:

    Default

    PHP Code:
    <?php

    if($fetch->ghostmode == "1")
    {

        echo(
    "Ghostmode[<font color=\"green\">ON</font>]");

    }
    elseif(
    $fetch->ghostmode == "0")
    {

        echo(
    "Ghostmode[<font color=\"red\">OFF</font>]");

    }

    ?>

  3. #3
    Join Date
    Apr 2006
    Location
    West Midlands
    Posts
    3,384
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php if($fetch->ghostmode == "1"){ echo" Ghostmode[<font color="green">ON</font>]";} elseif($fetch->ghostmode == "0") { echo" Ghostmode[<font color="red">OFF</font>]"; } ?>
    Last edited by Josh-H; 04-11-2007 at 01:26 PM.


    Xbox Live: Jholder112233
    PS3 Online Tag: Josh-H

    Last.fm | Digg | Xbox.com

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

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    PHP Code:
    <?php

    if($fetch->ghostmode == "1")
    {

        echo(
    "Ghostmode[<font color=\"green\">ON</font>]");

    }
    elseif(
    $fetch->ghostmode == "0")
    {

        echo(
    "Ghostmode[<font color=\"red\">OFF</font>]");

    }

    ?>
    Thankyou rep+

    Edit: Is there anyway i could only make it show for userlevel 4? -_-
    Last edited by Assassinator; 04-11-2007 at 01:30 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
  •