cliente fornitore

This commit is contained in:
2026-03-17 15:43:12 +03:00
parent 0e90db8219
commit 48387a9945
2 changed files with 114 additions and 22 deletions
+7
View File
@@ -12,6 +12,7 @@ try {
$iddatadb = intval($_POST['iddatadb']);
$idclient = isset($_POST['idclient']) ? (is_numeric($_POST['idclient']) ? intval($_POST['idclient']) : null) : null;
$clienteFornitoreId = isset($_POST['cliente_fornitore_id']) ? (is_numeric($_POST['cliente_fornitore_id']) ? intval($_POST['cliente_fornitore_id']) : null) : null;
$db = DBHandlerSelect::getInstance();
$pdo = $db->getConnection();
@@ -137,6 +138,12 @@ try {
$params[] = $idclient;
}
// 5a2) cliente_fornitore_id (se presente)
if (isset($clienteFornitoreId)) {
$setParts[] = "cliente_fornitore_id = ?";
$params[] = $clienteFornitoreId;
}
// 5b) fixed fields dal POST
// QUI è il punto chiave: accettiamo SOLO colonne reali (realWhitelist),
// ma se dal JS arrivassero ancora key logiche, funzionerebbe uguale