There are two ways I know of which can solve your problem.
1a. Sessions - first modify your form such that in the "value" field in your <input> tags insert variable names.
For example:
<form action="executeform.php" method="post">
Name: <input type="text" name="myname" size="11" maxlength="10" value="$sessname">
Job Title: <input type="text" name="mytitle" size="26" maxlength="25" value="$sesstitle">
</form>
1.b After the form is submitted, register the form variables as session variables.
$sessname = $POST['myname'];
$sesstitle = $POST['mytitle'];
session_register('sessname'); //without the $
session_register('sesstitle'); //without the $
If you submit the form and now go back the fields will be filled in. The draws backs to using session in this manner is you have to remember to unregister your session variables (i.e. session_unregister(<session variable name>))
The other option is messier...
2a. Follow step 1a above.
2b. When the form has been submitted, pass the variables back to the form. I would suggest enclosing the form in function tags if it is not currently. If there is an error call your form function passing along the form variables.
For example:
//original form with the form variables ($myname, $mytitle)initialized to nothing
//if there is an error the form variables ($myname and $mytitle)
//will have values and replace the information
function theform($myname="", $mytitle=""){
echo "<form action=\"executeform.php\" method=\"post\">
Name: <input type=\"text\" name=\"myname\" size=\"11\" maxlength=\"10\" value=\"$myname\">
Job Title: <input type=\"text\" name=\"mytitle\" size=\"26\" maxlength=\"25\" value=\"$mytitle\">
</form>";
}
Senerio: the form has been submitted. Form processing begins, there is an error, tell user and call the form function again...
echo "Error message<br>";
theform($myname,$mytitle);
I hope this makes sense.