-1
Guys good night. At this moment I am trying to enter data from a form in the database. However, it is not being inserted at all.
Code form:
<form action="enviar-ponto.php" method="POST">
<input name="nomePonto" value="<?php echo $resultado['nome']; ?>" readonly="readonly">
<input name="cpfPonto" value="<?php echo $resultado['cpf']; ?>" readonly="readonly">
<input name="horarioPonto" value="<?php echo date('H:i:s'); ?>" readonly="readonly">
<?php } ?>
<button> Bate Ponto</button>
</form>
Sending-point code.php
session_start();
include("conexao/conexao.php");
echo "Olá, ".$_SESSION['login']."<BR>";
$nome = $_POST['nomePonto'];
$cpf = $_POST['cpfPonto'];
$horario = $_POST['horarioPonto'];
if($horario > "11:30:00"){
$reck = "INSERT INTO ponto (nome, cpf, horario1, horario2, horario3, horario4) VALUES ('$nome','$cpf','$horario','$horario','$horario','$horario')";
}
if(mysqli_query($conexao, $reck)){
echo "Ponto registrado com sucesso";
}else{
echo "Impossível registrar ponto nesse momento";
}