delete("playlist", "dns_id = :dns_id AND mac_address = :mac_address", [":dns_id" => $dnsId, ":mac_address" => $macAddress]); // Respond with the result if ($deleted) { $response = ["success" => 1, "message" => "Playlist deleted successfully."]; } else { $response = ["success" => 0, "message" => "Error deleting the playlist."]; } echo json_encode($response); } else { // If dns_id or mac_address is missing $response = ["success" => 0, "message" => "Invalid data for deletion."]; echo json_encode($response); } ?>