For validation purposes I always like to print the Form within the script
that is doing the validation.  It solves a lot of problems.  As for coming
back to the Form at a later date the method is going to depend on how long
you want to keep the data.  A Session will only last as long as the client
is active.  A Cookie can last a lot longer but they can always be deleted
and many users turn them off until they absolutely need them.  You might
consider a Login/Password system and store the user preferences in a
database for the most flexibility and control.

To store the $_POST vars in a the active session using strict methods you
can do something like this:
foreach ($_POST as $key => $val)
{
    $_SESSION[$key] = $val;
}

-Kevin

----- Original Message -----
From: "Fernando M. Maresca" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 07, 2002 12:36 PM
Subject: [PHP] data verification trough _POST arrays


> hello everyone,
> first, is there a way of reloading a FORM with the data that the user
> have typed, after the action="validation.php" has been determined that
> some fields nedd to be reloaded? On other words, the user has no need to
> refill the entire form. Is a cookie needed?
> second one, what is the correct method for save _POST in _SESSION
> variables, so the values can be preserved for later retrieval?
>
> Excuse me for my english, thanks
>
> --
> Fernando M. Maresca
>
> Monitoring Station S.A.
> 48 nš 812 La Plata (B1900AHN) BA - ARG
> Tel/Fax: (54) 221 425-3355
> ICQ: 101304086
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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

Reply via email to