getConnection(); // Recupera l'ID dell'immobile $idhome = isset($_GET['idhome']) ? intval($_GET['idhome']) : 0; if ($idhome <= 0) { echo '

Errore: ID immobile non valido.

'; exit(); } // Recupera i proprietari associati all'immobile $stmt = $pdo->prepare(" SELECT po.owner_id, po.first_name, po.last_name, po.company_name, po.tax_code, po.email, ho.ownership_percentage, ho.notes FROM home_owners AS ho INNER JOIN property_owners AS po ON ho.owner_id = po.owner_id WHERE ho.home_id = ? "); $stmt->execute([$idhome]); $owners = $stmt->fetchAll(PDO::FETCH_ASSOC); if (!empty($owners)) { ?> "; } ?>
Nome Codice Fiscale % Note Azioni
" . htmlspecialchars($owner['first_name'] . ' ' . $owner['last_name']) . " " . htmlspecialchars($owner['tax_code']) . " " . htmlspecialchars($owner['ownership_percentage']) . " " . htmlspecialchars($owner['notes']) . "
Totale % Proprietà: %
Nessun proprietario associato.

'; } ?>