[thelist] sequential forms (PHP)

Hans Zaunere zaunere at yahoo.com
Thu Apr 18 16:31:01 CDT 2002


>
> 1) I use a 'temp' table in my db and link a visitor to their data via
> a
> session variable. Takes some time to set this up, but it's probably
> pretty
> robust

My choice.

>
> 2) I use 'hidden' form fields to hold the values from the previous
> page and
> to hold ALL of the values on the final page. (Or, when I ask them to
> confirm
> the order, I just display all of their choices in form fields so they
> can
> edit them right there on the confirmation page...that saves some
> work)

Would work, although I've always felt dirty about hidden form fields.

>
> 3) Something else I'm not thinking of. I know when I submit a form, I
> have
> all of the variables of it's elements in the array $_POST, can I just
> pass
> the array to the next form in one hidden field?
> <input type="hidden" name="form 1 values array" value="$_POST"> <=
> Seems
> like on form 2, this hidden field would contain all of form 1's $key,
> $value
> pairs, which I could then submit along with form 2's info to the
> confirmation page, at which point I can stop for the day and go to
> the
> beach.

Ahh.. beach... you could serialize $_POST and propagate it through a
session, assuming you don't have gads of data (you can always have
sessions use a DB, which may make choice 1) a little less painful).

Hans Z.
New York PHP
http://nyphp.org



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



More information about the thelist mailing list