Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa tarde pessoal,
Esse é meu 1º post aqui no fórum e estou estudando php.
Estou criando um sistema para a recepcionista da empresa, onde ela colocaria informações das ligações,
tipo se o cliente ou fornecedor foi atendido ou não e os motivos e tal, até ai os códigos que coloquei está beleza.
Mas o que quero e não estou conseguindo incrementar é o seguinte:
por exemplo para entenderem..
Hoje dia 19/06 recebi tantas ligações e logo abaixo o formulário estão aparecendo os dados da ligação que foi cadastrado pela recepcionista. Amanhã não quero que apareça os dados de hoje, que somente apareça os dados que forem cadastrados amanhã e assim sucessivamente.
Hoje o sistema esta aparecendo todos os dados juntos por datas, mas gostaria que só trouxesse o do dia.
Depois incremento uma busca por datas etc.
Ficarei grato pela ajuda.
Segue abaixo o meu código do formulario:
<hr />
<form method="post" action="funcoes/cadastro.php">
<div align="center">
<table width="472" border="0">
<tr>
<th scope="row"><div align="right">Data</div></th>
<td><input type="text" name="data" value="<?php echo date('d/m/Y');?>" size="7" /></td>
</tr>
<tr>
<th width="121" scope="row"><div align="right">Horário</div></th>
<td width="255"><input type="text" name="horario" value="<?php echo date('h:i');?>"size="2"/></td>
</tr>
<tr>
<th scope="row"><div align="right">Quem ligou</div></th>
<td><input type="text" name="ligacao" size="30" /></td>
</tr>
<tr>
<th scope="row"><div align="right">Empresa</div></th>
<td><input type="text" name="empresa" size="40"></td>
</tr>
<tr>
<th scope="row"><div align="right">Depto</div></th>
<td><input type="text" name="depto" size="40"/></td>
</tr>
<tr>
<th scope="row"><div align="right">Falar com</div></th>
<td><input type="text" name="funcionario" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">Assunto</div></th>
<td><input type="text" name="assunto" size="60" /></td>
</tr>
<tr>
<th scope="row"><div align="right">Status</div></th>
<td>
<select name="status">
<option value="0" selected="Selecione">Selecione</option>
<option value="não atendido">Não Atendido</option>
<option value="Atendido">Atendido</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><div align="right">Retorno</div></th>
<td><input type="text" name="retorno" size="30" /></td>
</tr>
<tr>
<th scope="row"><div align="right">Observações</div></th>
<td><textarea name="observacoes" rows="3" cols="40"></textarea></td>
</tr>
<tr>
<th colspan="2" scope="row"><input type="Submit" value="Cadastrar" /></th>
</tr>
</table>
</div>
</form>
<br />
<h3 align="center" class="preto">Ligações Atendidas</h3>
<hr/>
<div align="center">
<table width="1160" border="1">
<tr align="center" bgcolor="#C0C0C0" class="preto">
<td width="62"><strong class="preto">Data</strong></td>
<td width="74"><strong class="preto">Horário</strong></td>
<td width="83"><strong class="preto">Quem Ligou</strong></td>
<td width="75"><strong class="preto">Empresa</strong></td>
<td width="82"><strong class="preto">Depto</strong></td>
<td width="113"><strong class="preto">Falar Com</strong></td>
<td width="140"><strong class="preto">Assunto</strong></td>
<td width="94"><strong class="preto">Status</strong></td>
<td width="121"><strong class="preto">Retorno</strong></td>
<td width="252"><strong class="preto">Observações</strong></td>
</tr>
<?php
include "conexao.php";
$sql = mysql_query("SELECT * FROM agenda");
while($ln = mysql_fetch_array($sql)){
?>
<tr align="center" bgcolor="#FFFFFF" class="preto">
<td bgcolor="#CCCC99"><?=$ln['data']?></td>
<td bgcolor="#CCCC99"><?=$ln['horario']?></td>
<td bgcolor="#CCCC99"><?=$ln['ligacao']?></td>
<td bgcolor="#CCCC99"><?=$ln['empresa']?></td>
<td bgcolor="#CCCC99"><?=$ln['depto']?></td>
<td bgcolor="#CCCC99"><?=$ln['funcionario']?></td>
<td bgcolor="#CCCC99"><?=$ln['assunto']?></td>
<td bgcolor="#CCCC99"><?=$ln['status']?></td>
<td bgcolor="#CCCC99"><?=$ln['retorno']?></td>
<td bgcolor="#CCCC99"><?=$ln['obs']?></td>
</tr>
<?php
} // Fecha loop agenda
?>
Carregando comentários...