ok
Direktori : /home/keydecors/public_html/admin/controller/ |
Current File : /home/keydecors/public_html/admin/controller/delete_slider.php |
<?php ob_start(); include("../model/dboperation.php"); $id=$_GET['dete']; $sql = "SELECT * FROM sliders WHERE id=$id"; $result = $mysqli->query($sql); while($row = $result->fetch_assoc()) { unlink("../slider/$row[img]"); } $sql1 = "DELETE FROM sliders WHERE id=$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/slider_select.php"); ?>