<?php $ma = $_GET["mncc"]; $b = new B(); $sql = "delete from nhacungcap where MaNCC='{$ma}' "; $arr = array("{$ma}"); $t = $b->delete($sql, $arr); if ($t == 0) { $thongbao = "Loi xoa "; } else { $thongbao = "xoa {$t} loại sản phẩm "; } ?> <script > window.location="index.php?mod=dsnhacungcap"; </script> ?>
<?php $id = $_GET["idten"]; $a = new B(); $sql = "delete from danhmucsanpham where idTen='{$id}' "; $arr = array("'{$id}'"); $q = $a->delete($sql, $arr); if ($q == 0) { $thongbao = "Loi xoa "; } else { $thongbao = "xoa {$q} danh muc "; } ?> <script > window.location="index.php?mod=danhmuc"; </script>