You may add the value properties in the <input> tag, something like:
<form name="form1">
<input size="10" name="lastname" value="<? echo $lastname ?>">
once you submitted your form, the $lastname is set and displayed in the form field and if it's not set,i.e. the first time to load the page, the input box is therefore empty, just like a new form.
Simonsky