1
I have this checkbox
:
<input type="checkbox" name="seleciona[]" value="<?= $row_questao['codprova'] ?>" >
I have a query that returns multiple records and each record has one checkbox
for this line, I need that when marking some it send via POST the values to another page.
I’ve got it done so far:
if ($_POST) {
foreach ($_POST["seleciona"] as $checkSeleciona) { // linha 16
echo $checkSeleciona . ' - ';
}
}
But the page when giving the Submit it returns with the following error:
Notice: Undefined index: seleciona in C:\xampp\htdocs\sav\cadastraProva.php on line 16
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\sav\cadastraProva.php on line 16
Perfect @Sam, vlw same. the div of the checkbox was out of the form.
– Expresso 1002