This is cake! However, I'm going to giv e you some hints as opposed to just telling you how to do it.
Anyways, all the vars from the form can be found in either the $POST or $GET arrays. That's $HTTP_POST_VARS & $HTTP_GET_VARS, if you are using something older than 4.2, I think.
So, if the vars there, you know what to do with them right?
Also, it may be easier to do this:
<form action="check.php" method="post">
<b>Username:</b>
<input type="text" name="username"
value="<?php echo $_POST[username]; ?>">
</form>
Hope that helps,
BDKR