$aux = mysql_num_rows($sql2);
$html = '';
$html .= '<table border="1">';
$html .= '<tr>';
$html .= '<td colspan="3"><b><Center>'.$row[0].' </center></b></td></tr>';
$html .= '<tr><td align="center"><b>Instalador</b></td>';
$html .= '<td bgcolor="#A9A9A9" align="center"><b>Morada</b></td>';
$html .= '<td align="center"><b>Email</b></td>'
</tr>';
for($i=1; $i<=$aux; $i ++){
$sql = mysql_query("SELECT *
from Tabela WHERE id = $id = ".$i) or die(mysql_error());
$row=mysql_fetch_array($sql);
$html .= '<tr><td>'.$row[0].'</td>
<td>'.$row[1].'</td>
<td>'.$row[2].'</td>
<td>'.$row[3].'</td>
</tr>';
}
$html .= '</table>';
I have a problem putting background color on these two lines:
$html .= '<td bgcolor="#A9A9A9" align="center"><b>Morada</b></td>';
Here in this one I like to put a rule because it will receive dates. If the date is already past the rectangle is red.
<td>'.$row[2].'</td>