diff --git a/add_installation.php b/add_installation.php index 25f3c34..d0ade99 100644 --- a/add_installation.php +++ b/add_installation.php @@ -8,9 +8,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $technician_name = trim($_POST['technician_name'] ?? ''); $observations = trim($_POST['observations'] ?? ''); $status = trim($_POST['status'] ?? 'ativo'); - $voltage = trim($_POST['voltage'] ?? null); - $phase_neutral_ground = trim($_POST['phase_neutral_ground'] ?? null); - $breaker_output = trim($_POST['breaker_output'] ?? null); + $voltage = !empty($_POST['voltage']) ? trim($_POST['voltage']) : null; + $phase_neutral_ground = !empty($_POST['phase_neutral_ground']) ? trim($_POST['phase_neutral_ground']) : null; + $breaker_output = !empty($_POST['breaker_output']) ? trim($_POST['breaker_output']) : null; // Validation removed to allow incomplete forms