No, it will not automatically display his data. You'll have to provide the logic to insert the user's input into the form fields. I would typically display the error message above or below the form fields.
This means you'll have to include your logic above the display code. So, in pseudo-code, your file would look something like:
Code:
<?php
if (form_submitted)
{
get input variables;
validate_input();
if (input_valid)
{
process input variables;
redirect to next page;
}
else
{
populate output variables with user input;
set flag to display error message;
}
}
else
{
populate output variable as null;
}
display form;
?>
Bookmarks