At its most basic, when the user submits data from a form page, you can simply copy the $POST data into the $SESSION array:
<?php
session_start();
foreach($_POST as $key => $data)
{
$_SESSION[$key] = $data;
}
This is, of course, rather quick-and-dirty and perhaps problematic in terms of reliability/security. A better choice might be to create sub-arrays within the main $SESSION array to store the data from each form page. So for example, in the code that accepts the form submission from page 3 of the form sequence:
<?php
session_start();
$_SESSION['form_data'][3] = $_POST;
Then at any point in the process where you wanted to access some field from the form page 3 data (let's say there was a field named 'foobar'):
<?php
session_start();
$foobar = (isset($_SESSION['form_data'][3]['foobar'])) ? $_SESSION['form_data'][3]['foobar'] : null;