Generalized Brownian functionals and the solution to a stochastic partial differential equation