You can display the result in the same form just be setting up the HTML attribute value.
For an edit box you might have something like:
<input type="text" name="userName">
<input type="text" name="userName" value="myName">
so given that, you can do that in PHP
Code:
if (isset($userName))
echo '<input type="text" name="userName" value=' . $userName . '>';
else
echo '<input type="text" name="userName" value=>';
However you should read up on security and learn how to properly sanitise the data.