great thanks   =)

regards Patrick
"Chris Shiflett" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> --- Patrik Fomin <[EMAIL PROTECTED]> wrote:
> > How should you do it?, i mean i have 3 pages with some forms on two of
> > em First page = some general information to fill in Second page = more
> > deep informationand last page to confirm and store in the database.
>
> > What methods is there to do this? sessions?
>
> Yes, I think sessions would provide a more secure and elegant solution for
> what you are doing. I also think that you'll find things easier from a
> development perspective. You basically would follow this flow (you can
> structure your code however):
>
> 1. When user submits first page of data, validate it, and if it is valid,
> store it in the session. If it is not, goto 10 (funny BASIC reference, for
> those who missed it).
> 2. Go through the same process for the second page (except goto 20 if
> there is invalid data).
> 3. On the third page, display the valid data that is stored in the
> session. When the user clicks the button (or whatever) on this page, no
> data is actually sent, because the server already has it all. You just
> store the data that you already have in the session.
>
> This also saves you from passing data back and forth between the user and
> the server for every page.
>
> Hope that helps.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
>      Coming mid-2004
> HTTP Developer's Handbook - Sams
>      http://httphandbook.org/
> PHP Community Site
>      http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to