I have the following table which is built from a database entity.
HTML:
<table class="table table-hover" id="produtostab">
<thead>
<tr>
<th>Descrição</th>
<th>Quantidade</th>
<th>Selecionar</th>
</tr>
</thead>
<tbody id="myTable">
<?php
$conn = new mysqli('localhost', 'root', '', 'exemplo') or die ('Falha ao conectar-se com DB');
mysqli_query($conn, "SET NAMES 'UTF8'") or die("ERROR: ". mysqli_error($con));
$result = $conn->query("select idProduto, Descricao from produto");
while ($row = $result->fetch_assoc()) {
unset($idProduto, $Descricao);
$idProduto = $row['idProduto'];
$Descricao = $row['Descricao'];
echo '<tr>';
echo '<td>'.$Descricao.'</td>';
echo '<td contenteditable="true"></td>';
echo '<td><input type="checkbox"></td>';
echo '</tr>';
}
?>
</tbody>
</table>
In each row of the table, there is a checkbox. I need, after pushing a submit button, the content of all the rows that are checked (from the checkbox) to be stored in a PHP array to be queried later. How could he do that? I do not know if it is possible, if it is not, is there another way to get the values of these rows checked?