从php中的数据临时存储

I need a bit of advice. I've tried searching on here and Google but I've had no luck.

I have created a form in PHP. It has 32 fields containing a variety of text boxes and select boxes. When the user clicks submit they're taken to a new page where they can see the data they have entered. If they have made a mistake they have to click back to the form. Then they have to re-enter all of their data rather than just changing the incorrect field.

I'm a newbie and willing to try new things.

Thanks for any advice,

Dave

When the form is posted you can save it in the session like so:

$_SESSION['form'] = $_POST['form'];

And then when on the fill-out-the-form page, you can set the default values of the inputs:

<input type="text" name="form[name]" value="<?php echo isset($_SESSION['form']['name']) ? $_SESSION['form']['name'] : ''; ?>">