ha ragione kime,
ma perchè riscrivi tutto il codice?
basta cambiare la parte che colora la cella!
Codice PHP:
echo '<div align="center">';
echo '<center>';
echo '<table border="1" width="774" height="1" bordercolorlight="#000080">';
echo '<tr>';
echo '<td width="55" height="1"';
if ($results['riferimento']==NULL)
echo 'bgcolor="#66FFFF">';
else
echo '>';
echo '<p align="center"><font face="Arial" size="2">';
print ($results['numero']);
echo '<td width="83" height="1"><font face="Arial" size="2">';
print ($results['data']);
echo '</font></td>';
echo '<td width="217" height="1" >';
print ($results['oggetto']);
echo '<td width="137" height="1" align="center"><font face="Arial" size="2">';
print ($results['riferimento']);
echo '</font></td>';
echo '<td width="239" height="1" align="center"><font face="Arial" size="2"></font></td>';
echo '</tr>';
echo '</table>';
echo '</center>';
echo '</div>';