Código PHP:
echo "<table class=\"art-article\" width=\"1324px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tbody>";
echo "<tr>";
echo " <th>Correo</th>";
echo " <th>Centro</th>";
echo " <th>Planta</th>";
echo " <th>Mes</th>";
echo " <th>Año</th>";
echo " <th>fecha_solicitud</th>";
echo " <th>IP</th>";
echo " <th>Hostname</th>";
// echo " <th>message</th>";
echo " <th>autorizacion</th>";
echo "</tr>";
while($row = mysql_fetch_row($result))
{
echo "<tr>";
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td>$cell</td>";
if (empty($cell['autorizacion']))
{
echo "<TD><img src='images/X.png'></TD>";
}
else
{
echo "<TD><img src='images/Checkmark.png'></TD>";
}
echo "</tr>\n";
}
echo "</tbody></table>";
Código PHP:
if (empty($cell['autorizacion']))
{
echo "<TD><img src='images/X.png'></TD>";
}
else
{
echo "<TD><img src='images/Checkmark.png'></TD>";
}