Re: Multiple page form
| From: | 1LT John W. Holmes | Date: | Tue, 26 Nov 2002 21:59:34 +0000 |
| Subject: | Re: Multiple page form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126193@lists.php.net to get a copy of this message | ||
> Is there an actual way to store the data in a temporary table as you go
> through the multi-page form and then extract that data from the temporary
> storage from the DB App and either process the data or store it in a
> permanent place?
>
> I have never done this before, but maybe someone else has? Any tips on how
> to do this, what "type(s)" of DB tables are required to do this and can
you
> give me an url to help me research it further?
>
> I think this would be a great alternative to the sessions solution because
> it doesn't work really well with some PHP error handling that you need to
do
> for the forms. You have to register and unregister variables throughout
the
> form and it gets hard to keep track of when you have so many forms and
field
> variables to deal with. With a temporary DB table, I can just insert any
> data that has been checked for errors and then not have to worry about
> passing them back and forth until the end of the application when I
actually
> need to do something with them.
So don't add it to the session until you've verified the data. It's the same
as using a temp table but you don't have to worry about the overhead of the
database and you don't have to worry about cleanup with sessions.
Also, a true TEMPORARY table will only be there for the current connection,
so on the next page request, the table will be gone.
---John Holmes...