<?php
include("conexao.inc.php");

$data = date("Y/m/d");

$sql = "select * from inscricoes where serie_ano='6o ano' and unidade='Centro' and data_inscricao='$data' order by id";
$res = mysqli_query($conexao, $sql ) or die( 'Erro na query: <BR>' . $sql . '<BR>' . mysqli_error() );
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<style type="text/css">
<!--
.txt_form {	font-size: 9px;
	font-weight: bold;
}
body,td,th {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
}
-->
</style>
<title>Relatório</title></head>

<body>
<table width="100%" border="1">
  <tr>
    <td>Nº da Inscrição</td>
    <td>Nome</td>
    <td>Unidade pretendida</td>
    <td>Origem</td>
    <td>Data da Inscrição</td>
  </tr>
<?php
while ($row = mysql_fetch_array($res)){
?>
  <tr>
    <td><?php echo $row["inscricao"];?></td>
    <td><?php echo $row["nome"];?></td>
    <td><?php echo $row["unidade"];?></td>
    <td><?php echo $row["origem"];?></td>
    <td><?php echo date('d/m/Y', strtotime($row["data_inscricao"]));?></td>
  </tr>
<?php } ?>
</table>
<p><strong>Total de Inscritos: </strong><?php echo mysql_num_rows($res);?></p>
</body>
</html>
