I have used this to collect the checkbox value array.
<form action="example.php" method="post" name="deleteform">
<input type="submit" value="delete"/>
<table>
<?php
foreach ($memArray as $row) {
echo "<tr align=\"center\">
<td><input type=\"checkbox\" value=\"".$row['cus_id']."\" name=\"del[]\" /></td>";
echo "</tr>";
}
?>
</table>
</form
>
if the form is Posted, then do
$delArray = $_POST['del'];
print_r($delArray);
But the result returned Array, but nothing inside
I have changed name=del instead of name=del[], and it works . But when i add the [] back it return empty array
print_ring the entire$_POSTvariable. See what you can find there.