1
I am trying to make a simple point system in PHP only to calculate the time of departure based on the time I log in. For example, my check-in time is 07:00 and check-out is 16:48 what I want to do is set the time I enter and show the time I should leave.
Example: if I enter at 06:30 I entered 30 minutes earlier, then I would have to leave at 16:18, then I would have to decrease 30 minutes of the $output variable, but I can’t find a logic to do this.
HTML
<form action="dashboard.php?link=home" method="post" class="ajax_off">
<div class='row'>
<div class="col col-lg-4">
<div class="form-group mb-3">
<input type="text" class="form-control" name="hr_entrada" value="07:00:00">
</div>
</div>
<div class="col col-lg-8">
<div class='row'><button class="btn btn-icon btn-primary">Calcular</button></div> </div>
</div>
</form>
PHP
$Entrada = (isset($_POST['hr_entrada']) ? $_POST['hr_entrada'] : '07:00:00');
$Saida = '16:48:00';
Echo 'voce deve sair as '.$Saida;
Thanks for the reply I managed to resolve
– user167427