prepare("UPDATE inversion_general SET fecha = ?, tipo_gasto = ?, monto = ?, descripcion = ? WHERE id = ?"); $stmt->execute([$fecha, $tipo_gasto, $monto, $descripcion, $update_id]); header("Location: inversion_general.php?month={$month_redirect}&year={$year_redirect}&status=updated"); exit; } else { header("Location: edit_gasto.php?id={$update_id}&month={$month_redirect}&year={$year_redirect}&status=error"); exit; } } // Fetch the expense to edit $stmt = $pdo->prepare("SELECT * FROM inversion_general WHERE id = ?"); $stmt->execute([$id]); $gasto = $stmt->fetch(PDO::FETCH_ASSOC); if (!$gasto) { header("Location: inversion_general.php?status=not_found"); exit; } $pageTitle = 'Editar Gasto'; include 'layout_header.php'; ?>

Editar Gasto

Modificar Información del Gasto
Cancelar