If you submit a form, and it has variables filled out, they automatically go to the resulting page.
Suppose you ask the user for input
<INPUT TYPE='TEXT' NAME='varname'>
On the resulting page, if you want to display that input box again with the value, just do this:
<INPUT TYPE='TEXT' NAME='varname' VALUE='<? echo $varname; ?>>