I am unable to find a basic example of how to do the following, and would appreciate some help.
I have a long form (572 fields) that I want to break up into about 10 pages, using PHP sessions to carry data from page to page as the user fills out the form.
I would rather not have to do anything that involves hidden form fields or assigning all 572 fields to the session manually (this thing is huge). So, I was hoping I could to do it like so using an array:
<?php session_start();
foreach($_POST as $k=>$v) {
$_SESSION['post'][$k]=$v;
}
?>
My problem is this: How do I keep adding values from page to page to the session? I can get a session to carry values from page A to page B, but when I fill out the form on page B and go to page C, the values from page A are lost.
I need to know how to append values from forms fields on each page to the session, so that at the end of the form, I have all 572 form fields stored in the session and can do with them what I wish.