Hello
I'm trying to delete multiple entries from a mysql table using the following script:
variables are passed using:
<input type=\"checkbox\" name=\"checkbox[]\" value=\"$id\">
and....
<?
include ("include/header.inc.php");
include("include/dbconnect_dmoz.php");
if ($delete_checked) {
foreach ($_POST['checkbox'] as $value){
$delete = mysql_query("delete from $table where checkbox=$value",$db);
}
?>
<META HTTP-EQUIV="refresh" CONTENT="1; URL=dmoz_results.php">
<?
}
?>
the error is:
Warning: Invalid argument supplied for foreach() in ..../results.php on line 13
Any ideas greatly appreciated.
Cheers,
micmac