I have the following table:
<div class="table-responsive">
<form class="form-inline" action="registrosVazios.php" method="GET">
<table id="tabelaCupons" class="table table-condensed table-bordered table-striped" border="1px" bordercolor="#000000">
<thead>
<tr>
<th style="text-align:center;width: 10px">
<input type="checkbox" name="chkAll" onClick="checkAll(this)" />
</th>
<th style="text-align:center;vertical-align:middle;">
DATA
</th>
<th style="text-align:center;vertical-align:middle;">
PDV
</th>
<th style="text-align:center;vertical-align:middle;">
CUPOM
</th>
<th style="text-align:center;vertical-align:middle;">
VALOR
</th>
</tr>
</thead>
<tbody>
<?php
if (mysqli_num_rows($resultImportaPdv) > 0) {
while($row = mysqli_fetch_assoc($resultImportaPdv)) { ?>
<tr>
<td style='height:5px;text-align:center'>
<input type='checkbox' id='<?php echo $row["ie_cupom"]; ?>' name='<?php echo $row["ie_cupom"]; ?>' value='<?php echo $row["ie_cupom"]; ?>' onClick="verCheck()" >
</td>
<td style="height:5px;text-align:center;">
<?php echo date_format (new DateTime($row["ie_data"]), 'd/m/Y'); ?>
</td>
<td style="height:5px;text-align:center;">
<?php echo $row["ie_pdv"]; ?>
</td>
<td style="height:5px;text-align:center;">
<?php echo $row["ie_cupom"]; ?>
</td>
<td style="height:5px;text-align:center;">
<?php echo round($row["ie_valor"],2); ?>
</td>
</tr>
</div>
</div>
<?php
}
} else {
echo "0 registros";
}
?>
</tbody>
</table>
It looks like this:
WhatIneed,whenIcheckboxit,computesthetotalofthevaluecolumn
<tdstyle="height:5px;text-align:center;">
<?php echo round($row["ie_valor"],2); ?>
</td>
Only those who are checked.
Someone knows how I can do it, remembering that the name of the checkbox may be different, and I need to keep it that way.
Expected end result: