[nycphp-talk] More questions about working with forms
Tony Furnivall
tonyf at buffnet.net
Thu Dec 13 15:42:02 EST 2007
Thanks to those who replied earlier. I've moved on a little, and now
am wondering how to make an object 'persist' between activations of
an action script, associated with a button on the form.
The model I have (the common thread of most replies) is something
like this (not in php, but in reasonably self-evident pseudo code):
(firsttime) is determined by a test of the $_POST variables, or in
some similar way
if (firsttime) then
showform and wait for action script {this script} to re-activate
else
edit form data and build error stack
showform along with error stack and wait for next action
end
I can get this to work fine if I'm not using an object, but if I
create an object on the (firsttime) path, it disappears between then
and the next activation.
The object includes not only the functions to build the form display,
but also the editing and error-stack management functions (no
multiple inheritance :-().
Is it as simple as stashing away the object in a hidden field? or
maybe in some $_SESSION variable?
Thanks for any help!
Tony
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.17.1/1182 - Release Date: 12/12/2007 11:29 AM
More information about the talk
mailing list