I am creating a production recording system. What I want is that to automatically generate the input in "hour" based on the current system time. For example if the system time is in between 7.00 am and 7.15 am, the "hour" should be 1.Like that it should continue. I have written the following code but seems like it is wrong.Can anyone give me suggestions for that?
<?php
$sql="SELECT CURTIME() AS Time";
$result=mysqli_query($conn,$sql);
while($row = mysqli_fetch_array($result)){
$time=$row['Time'];
}
if("07:00:00"<="$time"<="07:15:00"){
echo "<input class='form-control' type='text' name='hour' value='1' readonly >";
}
?>