Hi
I found this code on here for dynamic multiple checkbox delete...in fact it seems to be the only item on the internet for PHP that I can find. Unfortuanetly I don't really understand it enough to implement it.
Please could someone help me.
the code like this.
in HTML, <- the form.
<?$i=0; then do the loop?>
<input type="checkbox" name="$deleteuser[$i]" value=$value">
<?$i++;?>
in the database part.
<?
$r1 = mysql_query("SELECT * FROM test", $conn);
for($i=0; $i<mysql_num_rows($r1); $i++)
{
if($deleteuser[$i]=="") $deleteuser[$i] = "''";
$sqlstm = $sqlstm."id = $deleteuser[$i]"." OR ";
}
$sqlstm = substr($sqlstm, 0, -3);
mysql_query("DELETE FROM test WHERE $sqlstm");
?>
Any other resources would be great..
Cheers Matt