foreach($_POST['delete'] as $var => $val) { $query = "DELETE FROM shoutbox WHERE date = '" . $val . "'"; $shout_res = db_res ( $query ); } gives me this error: [Sat Feb 09 02:12:02 2008] [error] [client IP] PHP Warning: Invalid argument supplied for foreach() in shoutbox_control.php on line 16, referer: shoutbox_control.php