Quote:
Originally Posted by DJCMBear
Ok then heres the code:
PHP Code:
$result=mysql_query("SELECT * FROM table");
if(mysql_num_rows($result)){
while($row = mysql_fetch_array($result)){
$risk = strtolower($row['Risk']);
if($risk=='yellow'){
$color = '#FFFF00';
}elseif($risk=='green'){
$color = '#33CC33';
}else{
$color = '';
}}}
print $color;
|
hi i have same question, my data are in number like 0,1,2,5,30,100,200 and so on,i want cell bgcolor in red where data equal or below 30 and data equal or below 60 in yellow and others in green color, plz help me. My colum name is "days to go".