0
I have the code below, if the score column has a field with "LOW" the color of only LOW has to be (#FFFF00) and if the field is HIGHT, only HIGHT has to 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 is that no color is changed in the field that has these cases. They could help me where I’m missing?
Grateful.
Do you intend to differentiate lines sequentially ? black-white-black-white-black-white, or vary depending on that field ?
– Edilson
I have a score column on my page, and wanted as each score has a color, score Higth = Red, Score Low = Yellow and Score Medium = Orange for example, only those colors have their respective color, the rest of the columns remain with the default color that is black.
– user54154