Beispiel #1
0

<?php 
include '../models/db.php';
include '../models/catraca_m.php';
$conn = conectaBanco();
?>

<html>

<head>
    <title> Catraca </title>
</head>


<body>
    Sistema de catraca

    <form action="" method="post" >
            <input type="submit" name="entrar" value="Entrar">
    </form>
</body>

</html>



<?php 
if (isset($_POST['entrar'])) {
    entrada($conn);
}
    <?php 
//    error_reporting(E_ERROR | E_WARNING | E_PARSE);
$hora = $_GET['face'];
$acao = $_GET['botao'];
if ($acao == 'entrada') {
    entrada($hora, $acao);
}
if ($acao == 'saida') {
    saida($hora, $acao);
}
function entrada($hora, $acao)
{
    echo $hora;
    echo $acao;
}
function saida($hora, $acao)
{
    echo $hora;
    echo $acao;
}