Re: idiot proofing
| From: | Shawn McKenzie | Date: | Wed, 24 Jun 2009 21:30:41 +0000 |
| Subject: | Re: idiot proofing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294547@lists.php.net to get a copy of this message | ||
PJ wrote:
> I have a bit of a situation.
> I have set up addBooks, editBooks and deleteBooks pages. Before
> complicating my life & mixing them up in one file, I am running tests.
> I'd like to make them idiot proof, up to a point.
> When the page is submitted and the code is parsed, the form inputs
> remain on the screen along with the submit buttons.
> I'm not sure of what is the normal way of closing/hiding/wiping the
> screen output before showing the result output of the operation.
> I do not want a user to resubmit the input which is still in the input
> $strings.
> I am wondering if I should be using some code to clear the inputs like
> unsetting??? sessions or a break or am I doing something wrong with the
> flow of the code?
> I'd like to leave the pages with only the output of success (or failure)
> and links to do another add/edit/delete operation.
> Thanks for any suggestions.
>
I've never tried it, but you can possibly submit to an intermediate page
that stuffs the post vars into a session, echos "please wait" and then
redirects to the page that does the processing. The processing page
gets the sessions vars and does its business.
--
Thanks!
-Shawn
http://www.spidean.com