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