An easy way would be to check and correct variables from the $POST array, put them back in the $POST array with the same key, and then add it to the $_SESSION array...
Exemple...
if(trim($_POST['name']) == <>) {
add_error('Name empty !');
}
// ....
$_POST['age'] = intval($_POST['age']);
//...
$_SESSION['Posted_data']['Page_1'] = $_POST;
You would do that on every page except the last one, and then on the last page, you would simply have to do something like this...
$_POST = array_merge($_POST, $_SESSION['Posted_data']['Page_1'], $_SESSION['Posted_data']['Page_2']);
I know this isn't quite clear, but I'm tired... 😛