How do I get the value of the checkbox in the code below?
It is a presence list and this code I modified for one that I use a little different and this way I do not know how to get the values of checked checkboxes in order to be able to in each name in the table to cast the date in each name.
I type the names of the table and those that are present I mark the checkbox and, when saving, the date will be written in every name that is marked.
Follow the code:
<table width="500" border="0" bordercolor="#B9B3B3" cellspacing=0 cellpadding=2 align="center">
<tbody>
<tr align="center">
<?php
$getfamilia = "SELECT * FROM $tabela";
$getfamiliaquery = $mysqli->query($getfamilia);
while($getfamilialine = mysqli_fetch_array($getfamiliaquery))
{
$fn1="Em Andamento";
$familia = $getfamilialine['nome'];
$familia_id = $getfamilialine['id'];
$fn=$getfamilialine['finalizado'];
if(strcasecmp($fn, $fn1) == 0)
{
echo "
<tr>
<td width='250' align='center'>$familia </td>
<td width='250' align='center'> <input type='checkbox' name='op'></td>
</tr>
";
}
}
echo "</table>"; /*fecha a tabela apos termino de impressão das linhas*/
print_r($mysqli->error);
if($mysqli->connect_errno)
{
echo"Falha na conexao";
}
else
{
}
?>
<br>
<input type="submit" value="SALVAR" />
</tr>
</tbody>
</table>