|
Posted by Rik on 02/07/07 23:03
dacoman@gmail.com <dacoman@gmail.com> wrote:
> Hello,
>
> I'm trying to make a registration form formed of four steps using the
> same file. At each step I process the $_POST vars, I colect some more
> and move to the next step. The problem I have is that after second
> step the $_POST varialble (array) clears out. I know that because I
> print_r($_POST) array.
>
> What am I doing wrong?
The $_POST array is created as a new array and populated with the current
posted variables on each page-request. If the variables you're checking
are not in the second form the user posts, they will not be available to
you.
To bypass this, you can either:
1. Start a session and save them in the $_SESSION array.
2. Make hidden postfields in the subsequent forms containing the previous
input. This would mean you have to revalidate them over and over again
though.
--
Rik Wasmus
Navigation:
[Reply to this message]
|