It is possible to capture a MySQL table data in a form with a checkbox as if it were Boolean, that is, I need to capture the following:
Nombre de empleado
Tiene Deuda Si _ No _
But this part I do not find how to pass it to the insertion part of data in the database.
This is the code I have in HTML:
<input type="checkbox" name="Prestamos" id="Prestamos" value="1">
With this one I already receive it:
<?php
if (isset($_POST['Prestamos']) && $_POST['Prestamos'] == '1')
echo '<div style="color:green">El empleado tiene deudas</div>';
else
echo '<div style="color:red">El empleado no tiene deudas.</div>';
?>