Jump to content

ddmbest88

New Members
  • Posts

    2
  • Joined

  • Last visited

ddmbest88's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can i ask to correct my code and explain how you woyld do it just to understand for future things?
  2. Hello guys and thank in advance for help. I have a custom game server and i am building maps that shows wheter a fortress has been conquered and by who and show the correct faction icon upon the map. here is my script: <?php include_once 'dbconnectgs.php'; //creating a connection with the database ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="styles/eye.css"> </head> <body> <?php $Divine=mysql_query("SELECT id,race FROM siege_locations WHERE id = '1011'");// selecting the race of the conquering faction from the table of the fortresses where the id of the fortress is 1011 ?> <div id ="Divine"> <?php $row = mysql_fetch_row($Divine); //fetching data //echo $row[1] showing resoult just to be sure that data are ok: it shows correct resoult BALAUR if ($row = "ELYOS") { //conditions to show the icon, i have 3 options: faction 1 faction 2 or computer faction 3 echo "<img src=\"http://someaddress.me/sieges/img/fortezze/elyos.png\" border=0>"; } elseif ($row = "ASMODIANS") { echo "<img src=\"http://someaddress.me/sieges/img/fortezze/asmodian.png\" border=0>"; } elseif ($row = "BALAUR") { echo "<img src=\"http://someaddress.me/sieges/img/fortezze/balaur.png\" border=0>"; } ?> </div> </body> </html> Now problem is that even if the fetch shows the fortress as currently conquered by faction 3 (balaur) the if condition thinks that it's always faction 1 (elyos), and shows faction 1 logo, where do i mess up?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.