Can anyone help me!!! I am a newbie!
I have a form with text input, after user enter data and submit, it will validate data against database. If there is an error, it will display error messages and display the same form again. My problem is how do you preserve the data on the form so that the user don't have to re-type the input data again!!
***file name is 'test.php':
echo "<form action='testsubmit.php' method='post'>";
echo "<INPUT name=FirstName type=text>";
echo "<INPUT name=LastName type=text>";
echo "<INPUT type=submit value=submit name=btnSubmit>";
echo "</form>";
***file name 'testsubmit.php':
if (strlen($LastName) < 0) {
echo "Minimum 1 characters for User Name. Please enter again!";
do_html_footer();
exit;
}
How do I go back to the previous page 'test.php' and at the same time, restore what user has entered?
What I am getting now is the data is lost when I go back to 'test.php' to re-enter data.
thanks a bunch!