I have the code below, if the score column has a field with "LOW" the color of only the LOW has to be (# FFFF00) and if the field is HIGHT, only HIGHT must have the color (# FF0000):
<?php
while($row = $stm->fetch()) {
$color = $row["score"];
echo "<tr>"."<td><input type=checkbox name='check[]' value='[]' ></td>"."</td><td>"."<font size='1'>" .$row['quantidade']. "</td><td>". "<font size='1'>". $row['data'] . "</td><td>"."<font size='1'>" . $row['ip'] . "</td><td>"."<font size='1'>" . $row['hostname'] . "</td><td>"."<font size='1'>" .$row['sender']. "</td><td>"."<font size='1'>" .$row['subject']."</td><td>"."<font size='1'>"."<div id=add9 align=middle style='color: {$color}; text-shadow: 1px 1px 1px black, 0 0 20px blue, 0 0 1px darkblue'>" .$row['score']. " <td><a href=delete.php?id=". $row['id'] . " data-placement='top' data-toggle='tooltip' title='Delete'><button class='btn btn-danger btn-xs' data-title='Delete' data-toggle='modal' data-target='#delete' </a><span class='glyphicon glyphicon-trash'></span></button></p>
</tr>".'' ;
}
switch($color){
case 'LOW':
$color = "#FFFF00";
break;
case 'HIGH':
$color = "#FF0000";
break;
return $color;
}
?>
What happens that no color is changed in the field that has these cases. Could you help me where I'm wrong?
Thank you.