我有delete.php
页,代码:
<?php
require $_SERVER['DOCUMENT_ROOT'].'/config/db.php';
$id = $_GET['id'];
$sql = "DELETE FROM `items` WHERE id = '$id'";
if (mysqli_query($con, $sql)) {
header("location: ../../items-list.php");
echo '<script language="javascript">';
echo '$.notify("Deleted");';
echo '</script>';
}
mysqli_close($con);
?>
还有另一页items-list.php
,表中列出了项目。我正在从数据库中删除项目,如下所示:
echo "<td>
<a href=\"config/delete.php?id=$row[id]\">
<span style=\"color: #e96875;\">
<i class=\"zmdi zmdi-delete zmdi-hc-fw\"></i>
</span>
</a>
</td>";
我想在items-list.php
页中显示带有文本“已删除”的弹出通知。我该怎么办?