我尝试从收件箱中删除邮件并将其移动到垃圾文件夹,但我的代码不起作用。谁能给我一些建议。
if($attachment!="")
{
/* $outputList .='' . $send. ' ' .$subject.' '.$time.'<hr/>'; */
/* $outputList .='<table><tr><td><input type="checkbox" class="check"></td><td style="width:30%;text-align:left">' . $send. '</td><td style="width:42%; text-align:left">' .$subject. '</td><td style="width:3%">' . $attach . '</td><td style="width:30%">'.$time.'</td></tr></table>'; */
$outputList .='<table><tr><td><input type="checkbox" class="check"></td><td style="width:30%;text-align:left">'.$sender.'</td><td style="width:45%;text-align:left">'.$subject.'</td><td style="width:3%" align="left" >' . $attach . '</td><td style="width:30%">'.$time.'</td></tr></table>';
}
else {
$outputList .='<table><tr><td><input type="checkbox[]" value=" $row["topic_id"]" class="check"></td><td style="width:30%;text-align:left">'.$sender.'</td><td style="width:45%;text-align:left">' .$subject. '</td><td style="width:3%" align="left" ></td><td style="width:30%">'.$time.'</td></tr></table>';
}
}
<div class="delete">
<input name="del" type="button" value="delete" action=""/>
<?php
include 'delete.php';
if (isset($_POST['del']) && isset($_POST['check']))
{
foreach($_POST['check'] as $del_id){
$del_id = (int)$del_id;
$result= odbc_exec($conn,"insert into trash (sender,cc,bcc,subject,message,attachment,filename,filesize,date)
select sender,cc,bcc,subject,message,attachment,filename,filesize,date from inbox where ID=$del_id");
if($result==true)
{
$result= odbc_exec($conn,"delete from sent where ID=$del_id");
$move="message deleted";
}else
$move="cannot delect the mail";
}
}
?>
</div>