this is inbox.php
while($msg=mysql_fetch_array($res))
{
$mid = $msg['mid'];
$sender = $msg['frm'];
$sub = $msg['sub'];
$dt = $msg['dt'];
$d = "ch".$mid;
echo '<tr>';
echo '<td align="center">';
echo '<input type="checkbox" name="ch[]">';
echo '</td>';
echo '<td align="center">';
echo $mid;
echo '</td>';
echo '<td align="center">';
echo $sender;
echo '</td>';
echo '<td align="center">';
echo "<a href = disp_msg.php?mid=$mid>$sub";
echo '</td>';
echo '<td align="center">';
echo $dt;
echo '</td>';
echo '</tr>';
}
and when the form is submitted delete.php is called.
the below is the delete.php
while
(list($k,$v) = each($ch))
{
$sql="delete from msg WHERE mid=$v";
print $sql;
}
AND it is giving me the ERROR;;;;;
Warning: Variable passed to each() is not an array or object in D:\Tution\php\MailApp\delete.php on line 11