You are here: Re: $_POST array clears out « All PHP « IT news, forums, messages
Re: $_POST array clears out

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация