Hi below is a section on my code
$Clanname = $r["Clanname"];
$Date = $r["Date"];
$Type = $r["Type"];
$Score = $r["Score"];
$Outcome = $r["Outcome"];
$Map1 = $r["Map1"];
$Map2 = $r["Map2"];
?>
<table width="1124" height="26" border="0" align="center">
<tr bordercolor="#999999" bgcolor="#333333">
<td width="90"><div align="center"><? echo"$Clantags";?></div></td>
<td width="90"><div align="center"><? echo"$Clanname";?></div></td>
<td width="121" height="22"><div align="center"><? echo"$Date";?></div></td>
<td width="133"><div align="center"><? echo"$Type";?></div></td>
<td width="108"><div align="center">
<?
if ($Outcome=="Win")
echo '<font color="#33FF00"> $Score </font>';
elseif ($Outcome=="Lost")
echo '<font color="#FF0000"> $Score </font>';
else
echo '<font color="#CCCCCC"> $Score </font>';
?>
The above is driving me mad. I want is to output the $Score entry from the database in a certain colour depending on what $Outcome is.
At the moment all it does is show the word $Score in green, red or grey based on $Outcome. The bit of code below works fine cause I am just using words. Just the above that is driving mad, can’t seem to work out
How to get it to change the echo output colour
Regards
</div></td>
<td width="97"><div align="center">
<?
if ($Outcome=="Win")
echo '<font color="#33FF00"> Win </font>';
elseif ($Outcome=="Lost")
echo '<font color="#FF0000"> Lost </font>';
else
echo '<font color="#CCCCCC"> Drew </font>';
?>
</div></td>
<td width="226"><div align="center"><? echo"$Map1";?></div></td>
<td width="225"><div align="center"><? echo"$Map2";?></div></td>
</tr>
</table>