0) { $row = mysqli_fetch_assoc($result); $videoPath = $row['video_url']; // Delete the video file from the server if (file_exists($videoPath)) { unlink($videoPath); // Delete the file } // Delete the video entry from the database $deleteQuery = "DELETE FROM bhavan WHERE id = $id"; if (mysqli_query($conn, $deleteQuery)) { $message = "Video deleted successfully!"; $status = "success"; } else { $message = "Error deleting video!"; $status = "error"; } } else { $message = "Video not found!"; $status = "error"; } } else { $message = "Invalid request!"; $status = "error"; } ?>