HTML表单并传回数据

My html form is spreading over several pages (steps), and I want to let the use to take step back in case they would like to change something they filled in. So, I don't want to make users re-type all the information they already have typed once. Thus, how would I make it so that all the information would go back, to speak so? (I use PHP on server-side.)

Store the data entered so far in the session, and pull it out when displaying the form.

Being considerably vague, I suspect you'll receive no serious advice to begin with.

The only thing we can recommend you is to utilize PHP's session capabilities wisely.

usually using javascript history.back(1) and appropriate cache settings, the browser will preserve the entered data, but if you don't want to rely on that you can store each page in the session (here we're on step 3):

<input name="city" value="<?php echo htmlentities($_SESSION[$formId][2]['city'])" />

$formId is simply a random variable defined the first time the form is viewed (page 1, non-post request):

<input type=hidden value="<? htmlentities(uniqid()) ?>" />

and on each page the hidden ID for that form task is passed along...