If the user fills in the field: username with the response "Chuck" you want to update the file with that information.
You then want to display the screen again with that information still in place?
if that's the case, the way I have done it in the (distant (about 2 years ago))past was to rebuild the html in the cgi script using data from the file to fill in the form defaults.