NYCPHP Meetup

NYPHP.org

[nycphp-talk] More questions about working with forms

John Campbell jcampbell1 at gmail.com
Thu Dec 13 16:53:45 EST 2007


> Is it as simple as stashing away the object in a hidden field? or
> maybe in some $_SESSION variable?

Don't use sessions.   You need to embrace the atomic nature of a web
request, and just reconstruct the object on each request.  Each
request should have all of the information required to reconstruct the
object.  I am not sure what you are trying to do, but maybe you need
hidden form fields to retain state across requests.

In my opinion, sessions should be used very sparingly.

Regards,
John Campbell



More information about the talk mailing list