People need a light to unfold a TIMESHEET.
I have the following code.
<form method="post" action="includes/input.php">
<button type="submit" class="btn btn-primary" onClick="send('login');" value="login" >Default</button>
<button type="submit" class="btn btn-primary" onClick="send('break');" value="break" >Default</button>
<button type="submit" class="btn btn-primary" onClick="send('breakout');" value="breakout" >Default</button>
<button type="submit" class="btn btn-primary" onClick="send('logout');" value="logout" >Default </button>
</form>
This form perfectly calls the pages. The problem is that the first Submit is an INSERT INTO that works fine by sending four dates to the bank via Mysqli with the NOW () function.
$sql = "INSERT INTO registros (id, re, login, inbreak, outbreak, logout) VALUES ('', '$re', now(), now(), now(), now())";
The third column with the function Now () indicates the operator input time on the production line, the fourth column the break input, and so on, I need help understanding how I perform the update of these columns, but I'm not able to capture the ID to perform the update.
Follow the code of the page that would be for the update of the fourth column.
$id = mysqli_insert_id($link);
var_dump($id);$re = '';
$sql = "UPDATE registros SET breakin = NOW() WHERE id = $id;"
Thanks in advance.