如果执行成功,我想显示成功消息。下面的代码没有显示消息,只是将其删除。我错过了什么?
$errors = array();
$delete = $mydb->prepare("update messages set deleted = 'yes' where to_user = ? and id = ? ");
$delete->bind_param('ss', $username->username, $id);
foreach ($_POST['id'] as $id) {
$delete->execute();
}
$errors[] = "Message Deleted.";
}
<div><?php
if ($delete->execute()) { echo $errors;}
?>
</div>