I am having multi record delete problem. It shows an error about foreach loop.
<?php if(isset($_REQUEST['action'])&&$_REQUEST['action']=="delete")
{
$value=$_REQUEST['check'];
foreach($value as $ids)
{
$dquery="SELECT songname FROM songs WHERE id='$ids'";
$dresult=mysql_query($dquery);
$drow=mysql_fetch_array($dresult);
$songtodel=$drow['songname'];
$path2="../upload/$songtodel";
if(is_file("../upload/$songtodel"))
unlink($path2);
$mdquery="DELETE FROM songs WHERE id='$ids'";
mysql_query($mdquery);
}
}