It is showing error about foreach loop. Error is:
Warning: Invalid argument supplied for foreach() in D:\wamp\www\greenmusic\admin\sec.php on line 408
<form id="adminsform" name="adminsform" method="post" action="">
<input type="checkbox" name="master" onClick="checkedAll('adminsform')" value=""/>
<?php while($row=mysql_fetch_array($result))
{ ?>
<input type="checkbox" name="musicid[]" value="<?=$row['id']?>" />
<?=$row['song']?>
<?=$row['singername']?>
<?=$row['songtype']?>
<td width="15%"><?=$row['songtypeav']?></td>
<?php if($row['songtypeav']=="Audio Song") { ?>
<a href="sec.php?id=<?=$row['id']?>&act=play">Play</a><?=" "?><a href="edit.php?id=<?=$row['id']?>">Edit</a>
<?php } if($row['songtypeav']=="Video Song") { ?>
<a href="vidsong.php?id=<?=$row['id']?>">Play</a><?=" "?><a href="edit.php?id=<?=$row['id']?>">Edit</a>
<?php } ?>
if(isset($_REQUEST['ac'])){
foreach($_REQUEST['musicid'] as $ids)
{
$mdquery="DELETE FROM members WHERE id='$ids'";
mysql_query($mdquery);
//header('Location:sec.php');
}
}
</form>