or... you could make the hidden fields from a php script like, you could temporarily write to a file, so if the user goes back, all the data will be there...
like this:
<?
include "tempfile.php";
print "<input type=\"hidden\" value=\"$somevar\">";
/ right there it will include a null value so nothing will display, but if the user previously submitted data, it will display/
?>
well you get the point....