Good afternoon. the fact is that I have a table that is filled from a database and I need to place a checkbox that when I select it, I only enable that row, the php code of the table is:
<?php
$sql = "Select * FROM usuarios, estado, roles Where estado.id_estado = usuarios.id_estado AND roles.id_rol = usuarios.id_rol";
$result = mysqli_query($conexion,$sql);
echo "
<br>
<br>
<table id='usuarios' border = 1 cellspacing = 1 cellpadding = 1>
<tr>
<th>Identificacion</th>
<th>Nombre</th>
<th>Apellido</th>
<th>Telefono</th>
<th>Direccion</th>
<th>Fecha de registro</th>
<th>Estado</th>
<th>Rol</th>
</tr>";
while($row = mysqli_fetch_array($result)){
echo "
<tr class='item'>
<td>
<input name='ident' class='cajas' type='text' id='ident' value=" . $row['identificacion'] . " disabled>
</td>" .
"<td>
<input name='nombre' class='cajas' type='text' id='nombre' value=" . $row['nombre'] . " disabled>
</td>" .
"<td>
<input name='apellido' class='cajas' type='text' id='apellido' value=" . $row['apellido'] . " disabled>
</td>" .
"<td>
<input name='telefono' class='cajas' type='text' id='telefono' value=" . $row['telefono'] . " disabled>
</td>" .
"<td>
<input name='direccion' class='cajas' type='text' id='direccion' value=" . $row['direccion'] . " disabled>
</td>" .
"<td>
<input name='fecha' class='cajas' type='text' id='fecha' value=" . $row['fecha_registro'] . " disabled>
</td>" .
"<td>
<input name='estado' class='cajas' type='text' id='estado' value=" . $row['estado'] . " disabled>
</td>" .
"<td>
<input name='rol' class='cajas' type='text' id='rol' value=" . $row['tipo'] . " disabled>
</td>" .
"<td>
<input type='checkbox'>
</td>" .
"</tr>";
}
echo "</table>";
?>
I do not know if it's possible with a JS function, I tried with the OnClick
property in the check but it does not work for me
Thank you very much