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?