HTML_QuickForm_Controller and sessions
| From: | Jeff Schmidt | Date: | Wed, 18 Feb 2004 14:55:32 +0000 |
| Subject: | HTML_QuickForm_Controller and sessions | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10771@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
~ I just have a few questions about the interaction of
HTML_QuickForm_Controller and sessions. 1)If I have already setup a
session for my own purposes, I presume that Controller will use the
already existing session, and not setup a new session, correct? 2) I
want to offer users who are logged into the site the ability to save the
form, and come back and finish filling it out later. What's the best way
to go about this? Two basic ways occur to me. The first is that when the
user clicks the 'save' button, the action that I define would walk
through all the values in the form, serialize them, and stuff them into
my database, then when the user returns, in the default action handler,
I check to see if there is a record in my database that matches their
userid, and I unserialize the values and use
HTML_QuickForm_Controller::setDefaults() to restore the data. But that
method seems like quite a lot of work.
The second possible method that occurs to me is that the
HTML_QuickForm_Controller already does all the work to
serialize/unserialize all the information for the form. If there is some
way that I could grab all the form data as an already serialized string,
and then feed that back to the controller page when the user returns,
that'd be simpler for me. Is there any way to do this?
Jeff Schmidt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAM3zc/djDnfAeGysRAm3dAJ4qewrRFQBYLf7iv9Yr7GbXl9m6dwCgiFuE
6vzUS0LtQlsp0EBXJSx2hgQ=
=ZwlO
-----END PGP SIGNATURE-----