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!

    Well on my mafia game, all rank's have a bar with there percent on.But im trying to make Top rank's have something called "Xp" instead.Anyone know what is wrong with this?

    PHP Code:
    <?php

    if($fetch->rank == "Scum" || $fetch->rank == "Tramp" || $fetch->rank == "Chav" || $fetch->rank == "Vandal" || $fetch->rank == "Mobster" || $fetch->rank == "Hitman" || $fetch->rank == "Agent" || $fetch->rank == "Boss" || $fetch->rank == "Assassin" || $fetch->rank == "Godfather" || $fetch->rank == "Global Threat" || $fetch->rank == "World Dominator" || $fetch->rank == "World Class Dominator" || $fetch->rank == "Untouchable Godfather" || $fetch->rank == "Legend") { echo "<body>
    <table width="
    0%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="
    0" colspan="3" align="top" valign="top" scope="col"><div align="middle">
            <table width="
    100" height="0" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
              
    <tr>
                <
    td width='.makecomma($percent)."%"; ?>' <font color=#8a8a8a><div align="center"><font color="#FFFFFF"><b>
                    
    .makecomma($percent)."%"?></b></font></div></td>"; }

    elseif($fetch->rank == "Official Bliss Godfather") { echo "<b><font color=#8a8a8a>Xp:</font>"; }



    ?>

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

    Latest Awards:

    Default

    If you don't know; you should leave PHP.

    No offence, x.

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

    Latest Awards:

    Default

    I know the basic Php, i coded that but it just shows as blank
    So can anyone help?

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

    Latest Awards:

    Default

    PHP Code:
    <?php

    if($fetch->rank == "Scum" || $fetch->rank == "Tramp" || $fetch->rank == "Chav" || $fetch->rank == "Vandal" || $fetch->rank == "Mobster" || $fetch->rank == "Hitman" || $fetch->rank == "Agent" || $fetch->rank == "Boss" || $fetch->rank == "Assassin" || $fetch->rank == "Godfather" || $fetch->rank == "Global Threat" || $fetch->rank == "World Dominator" || $fetch->rank == "World Class Dominator" || $fetch->rank == "Untouchable Godfather" || $fetch->rank == "Legend") { echo "<body>
    <table width="
    0%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="
    0" colspan="3" align="top" valign="top" scope="col"><div align="middle">
            <table width="
    100" height="0" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
              
    <tr>
                <
    td width='.makecomma($percent)."%";' <font color=#8a8a8a><div align="center"><font color="#FFFFFF"><b>
                    
    .makecomma($percent)."%</b></font></div></td>"; }

    elseif(
    $fetch->rank == "Official Bliss Godfather") { echo "<b><font color=#8a8a8a>Xp:</font>"; }



    ?>
    EDIT: Oh and in my first post I was only kidding. I would never advise you to give up PHP. You're still learning and doing a good job ;] x
    Last edited by Invent; 15-09-2007 at 02:58 PM.

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

    Latest Awards:

    Default

    Hmm its stilling showing white

    Do you want the full script of the page?

    And thanks x

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

    Latest Awards:

    Default

    Oooh.

    There was a big error in the code I posted, Ill fix it in a sec

    EDIT:
    PHP Code:
    <?php

    if($fetch->rank == "Scum" || $fetch->rank == "Tramp" || $fetch->rank == "Chav" || $fetch->rank == "Vandal" || $fetch->rank == "Mobster" || $fetch->rank == "Hitman" || $fetch->rank == "Agent" || $fetch->rank == "Boss" || $fetch->rank == "Assassin" || $fetch->rank == "Godfather" || $fetch->rank == "Global Threat" || $fetch->rank == "World Dominator" || $fetch->rank == "World Class Dominator" || $fetch->rank == "Untouchable Godfather" || $fetch->rank == "Legend") { echo "<body>
    <table width=\"0%\" height=\"0\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
      <tr>
        <td height=\"0\" colspan=\"3\" align=\"top\" valign=\"top\" scope=\"col\"><div align=\"middle\">
            <table width=\"100\" height=\"0\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#000000\">
              <tr>
                <td width="
    .makecomma($percent)."%<font color=\"#8a8a8a\"><div align=\"center\"><font color=\"#FFFFFF\"><b>"
                    
    .makecomma($percent)."%</b></font></div></td>";
     }

    elseif(
    $fetch->rank == "Official Bliss Godfather") { echo "<b><font color=\"#8a8a8a\">Xp:</font>"; }



    ?>
    Last edited by Invent; 15-09-2007 at 03:01 PM.

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

    Latest Awards:

    Default

    Omg it works, thankyou SO MUCH! x

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

    Latest Awards:

    Default

    Hmm its stilling showing white
    I think your host has disabled showing PHP Errors.

    I'd ask them to enable showing them.

  9. #9
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    I think your host has disabled showing PHP Errors.

    I'd ask them to enable showing them.
    You can't disable errors in PHP last time I checked.

    Try this

    PHP Code:
    <?php
    if($fetch->rank() == "Scum" || $fetch->rank() == "Tramp" || $fetch->rank() == "Chav" || $fetch->rank() == "Vandal" || $fetch->rank() == "Mobster" || $fetch->rank() == "Hitman" || $fetch->rank() == "Agent" || $fetch->rank() == "Boss" || $fetch->rank() == "Assassin" || $fetch->rank() == "Godfather" || $fetch->rank() == "Global Threat" || $fetch->rank() == "World Dominator" || $fetch->rank() == "World Class Dominator" || $fetch->rank() == "Untouchable Godfather" || $fetch->rank() == "Legend")
    {
        echo 
    '<body>
    <table width="0%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="0" colspan="3" align="top" valign="top" scope="col"><div align="middle">
            <table width="100" height="0" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
              <tr>
                <td width="' 
    makecomma($percent) . '%"> <div align="center"><font color=#8a8a8a>Xp:</font> <font color="#FFFFFF"><b>' makecomma($percent) . '%</font></div></td>';
    }

    ?>
    I assume that's what you'd like to see


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

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

    Latest Awards:

    Default

    You can't disable errors in PHP last time I checked.
    I have been told you can.

    As my friend (Patrick) could not see PHP Errors on his site. He contacted his support and they told him they enabled error displaying?

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
  •