Many ways to do this. A simple approach is to have the form post to page2. Page2 would save the data to the db and then display form 2, which would post to page 3 etc.
// page1
<body>
<form <form name="form1" action="page2.php" method="post">
<input type="text" name="user">
<input type="text" name="q1">
<input type="text" name="q2">
etc
<input type="submit" name="save1" value="next page">
</form>
</body>
//page2
<?php
session_start;
$_SESSION['user']=$_POST['user'];
$_SESSION['q1']=$_POST['q1'];
$_SESSION['q1']=$_POST['q2'];
//either now or all at once when user finishes
$sql="INSERT INTO table VALUES('$user', '$q1', '$q2')";
// run query and check for errors etc
include 'header.php';
?>
<body>
<form <form name="form2" action="page3.php" method="post">
<input type="hidden" name="user" value="<?=$_SESSION['user']?>">
<input type="text" name="q3">
<input type="text" name="q4">
etc
<input type="submit" name="save2" value="next page">
</form>
</body>
Example only this code will not work as is.