[nycphp-talk] Losing data on post
Jeff
jsiegel1 at optonline.net
Fri May 9 23:16:04 EDT 2003
You're correct. It *was* a design problem.
I simply moved the session_register stuff to the confirmation page
and...after cleaning my glasses <g> I realized that I looped through the
array ($_SESSION['srDE_sCategories'] is an array from the multi-select
box) BEFORE I had "officially" set the value of this session variable.
Then everything worked fine. (Sometimes the act of writing an email
"clears the mind" and makes the solution apparent.)
Jeff
-----Original Message-----
From: Chris Shiflett [mailto:shiflett at php.net]
Sent: Friday, May 09, 2003 7:40 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Losing data on post
--- Jeff <jsiegel1 at optonline.net> wrote:
> I have a form that has a multi-select dropdown. When the user clicks
> 'submit' the data is posted to a "confirmation" form. The confirmation
> form checks the data. If there is an error, the user goes back to the
> form.
That sounds like a design problem. Why should the user go back?
You can avoid the problem you describe entirely by re-displaying the
form if there is an error (highlighting and/or describing the errors, of
course). Then you can prefill the form howver you like. This is much
more reliable, but more importantly, it's much more user-friendly.
Hope that helps.
Chris
--- Unsubscribe at http://nyphp.org/list/ ---
More information about the talk
mailing list