2
I have a table on a php page that displays customers who have sent leads to the site. There is how I create an input in which the user puts a date and only appears the leads sent on this date?
<?php
header('Content-Type: text/html; charset=utf-8');
$host = "localhost";
$usuario = "";
$senha = "";
$bd = "";
$mysqli = new mysqli($host,$usuario,$senha, $bd); /*Conecta no bando de dados MySql*/
$consulta_carro = "SELECT * FROM automovel";
$consulta_moto = "SELECT * FROM moto";
$consulta_casa = "SELECT * FROM casa";
$con_carro = $mysqli->query($consulta_carro) or die ($conexao->error);
$con_moto = $mysqli->query($consulta_moto) or die ($conexao->error);
$con_casa = $mysqli->query($consulta_casa) or die ($conexao->error);
$datahora = "d/m/Y - H:i:s";
?>
<html>
<head>
</head>
<body>
<div class="center">
<h2>Automóvel</h2>
<table class="tabela">
<tr>
<!--<td>Valor</td>-->
<td class="linha-nome">Nome</td>
<td class="linha-cidade">Cidade</td>
<td class="linha-telefone">Telefone</td>
<td class="linha-email">Email</td>
<td>Data de envio</td>
</tr>
<?php while($dado = $con_carro->fetch_array()){ ?>
<tr>
<!--<td><?php // echo $dado['valor'] ?></td>-->
<td class="capitalize"><?php echo $dado["nome"] ?></td>
<td class="capitalize"><?php echo $dado["cidade"] ?></td>
<td class="capitalize"><?php echo $dado["telefone"] ?></td>
<td class="capitalize"><?php echo $dado["email"] ?></td>
<td class="capitalize"><?php echo date($datahora, strtotime($dado['data_cadastro'])) ?></td>
</tr>
<?php } ?>
</table>
</div>
</body>
</html
If you want to see the tables, it’s in this page