For my log-in page, if the user doesn't enter the username or password, I have this:
echo '<p>Incorrect name and or password. Try again.</p>';
echo '<p>Register <a href = "register.html">here</a></p>';
echo '<form>';
echo '<input type = "button" value = "Previous Page" onclick = "history.go(-1)" />';
echo '</form>';
Click on the button, and whatever was filled in remains. Don't know if that's how you have it or not.
Can have the form fill-out page, SUBMIT, pass the data, "Is this correct?" Yes, INSERT into db then. No, click 'back' button.