I have the following table:
<table width="100%" class="table table-bordered table-hover table-responsive table-striped" id="empenho_solicitante">
<thead>
<tr> <th colspan="5"> +---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+</th> </tr>
<tr> <th colspan="2"> FIN503 - CONTABILIDADE PUBLICA </th> <th colspan="3"> RELATORIO DE EMPENHOS POR SOLICITANTE</th> </tr>
<tr> <th colspan="2"> PREFEITURA MUNICIPAL DE ITABIRA </th> <th colspan="3"> NO PERIODO DE <?php echo $dataIni." À ".$dataFim ?> </th> </tr>
<tr> <th colspan="5"> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ </th> </tr>
<tr> <th colspan="5"> SOLICITANTE: <?php echo $cod_orgao.".".$cod_unidade." - ".$unidade; ?> </th> </tr>
<tr> <th colspan="5"> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ </th> </tr>
<tr>
<th>Empenho</th>
<th>Programatica</th>
<th>Conta Desp.</th>
<th>Credor</th>
<th>Valor</th>
</tr>
</thead>
<tbody>
<?php
while ($linha = sqlsrv_fetch_array($resultado))
{
?>
<tr class="odd gradeA">
<td align = "right"> <?php echo $linha["num_empenho"]; ?> </td>
<td align = "center"> <?php echo $linha["programatica"]; ?></td>
<td align = "center"> <?php echo $linha["conta_desp"]; ?></td>
<td align = "left"> <?php echo $linha["nome_fornecedor"];?></td>
<td align = "right"> <?php echo
number_format($linha["valor_empenhado"], 2, ',', '.');
$total += $linha["valor_empenhado"];
?></td></tr>
<?php
}
?>
<td colspan="4" align = "middle"> <?php echo "Valor empenhado para este solicitante no período:" ?> </td>
<td> <?php echo number_format($total, 2, ',', '.'); ?> </td>
</tbody>
</table>
I would like it to appear only after I press this button here:
<input type="submit" id="consultar" value="Consultar" /><br>
Currently the table is fixed on the page, then when I open it already appears, but I would like it to appear only after 4 fields are filled in and the consult button is activated.
The table data I get from a DB, but I believe there is no need to post the query.