ok
Direktori : /home/keydecors/www/admin/controller/ |
Current File : /home/keydecors/www/admin/controller/delete_product.php |
<?php ob_start(); include("../model/dboperation.php"); $id=$_GET['dete']; $sql = "SELECT * FROM gallery_img WHERE ids=$id"; $result = $mysqli->query($sql); while($row = $result->fetch_assoc()) { unlink("../pro_img/$row[imgs]"); } $sql1 = "DELETE FROM gallery_img WHERE ids=$id"; if (mysqli_query($mysqli, $sql1)) { echo "Record deleted successfully"; } else { echo "Error deleting record: " . mysqli_error($conn); } $suc="Deleted Successfully"; ob_clean(); header("location:../pages/image_select.php"); ?>