I'm having second thoughts about generating an excel with the query.
<?php
include("conectar.php");
$id = $_GET['id'];
$arquivo = 'Não autorizado .xls';
First question: In the $ share part, can I put a variable to rename the file?
// -- Cabeçalho do arquivo -------------------------------------
$html .= '<tr><td align="center"><b>Instalador</b></td>';
$html .= '<td align="center"><b>Morada</b></td>';
$html .= '<td align="center"><b>Email</b></td>';
$html .= '<td align="center"><b>Validade</b></td>';
</tr>';
for($i=1; $i<=$aux; $i ++){
$sql = mysql_query("SELECT tb_trabalhador.Nome,Morada,Email,Validade from
tb_detalhe_trabalhador inner join tb_trabalhador on
tb_detalhe_trabalhador.id = tb_trabalhador.id inner join
tb_equipamentos on tb_detalhe_trabalhador.id = tb_equipamentos.id
inner join tb_funcoes on tb_detalhe_trabalhador.id = tb_funcoes.id
WHERE tb_trabalhador.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>';
Second question: I'm going to export data to Excel with many dates. Is it possible for me to export the data to Excel and where dates have been passed in relation to today's date to be a red rectangle?