Next, I'm creating an employee page that will work in the "hitting card" scheme. That is, whenever the employee arrives, he will click on the button inside the system and the intention was to show the time that was clicked and stay there. Then, when he left, he would "battery card" again and show the time. At the end of the day, this would be "reset" (that is, the button would come back) and the time, date, and such things would go into the employee's history. BUT, I have no idea how to do this, since my programming knowledge is not so advanced.
I do not know how to make the cute date appear on the table next to it. I tried to make an if, it includes an isset. Anyway, I tried several methods but I have no idea how to do this. I am open to suggestions, opinions. I really need to do this!
Thank you!
<?php
include './abreConexao.php';
$sqlFunc = "Select * from FUNCIONARIOS";
$rsFunc = mysql_query($sqlFunc) or die (mysql_error());
?>
<table border="1">
<?php
while($tblFunc = mysql_fetch_array($rsFunc)){
?>
<tr>
<td>
<?=$tblFunc['nome_FUNCIONARIO']?>
</td>
<td align="center">
<form action="Funcionarios.php" method="POST">
<input type="submit" value="" name="horaEntrada">
</form>
</td>
<td align="center">
<input type="submit" value="" name="horaSaida">
</td>
</tr>
<?php
} ?>
</table>
WHAT I TRIED TO DO IS:
<?php
$horaEntrada = $_POST['horaEntrada'];
if(isset($_POST['horaEntrada'])){
$horaEntrada = 1;
}else{
$horaEntrada = 0;
}
if($horaEntrada == 1){
date_default_timezone_set('America/Sao_Paulo');
$date = date('Y-m-d H:i');
echo $date;
}