Sure. The idea is to take the data from the refering page, validate it, if an error, pass the data back to the originating form.
// page1.php
<form action="action.php" method="post">
<?php
if ( isset($_GET['myData']) )
echo "<input type=\"text\" name=\"myData\" value=\"$_GET[myData]\">";
else
echo "<input type=\"text\" name=\"myData\">";
?>
<input type="submit" name="formSubmitted">
</form>
// action.php
<?php
if ( isset($_POST['formSubmitted']) )
{
if ($_POST['myData'] == "yes")
{
header("location: page1.php?myData=$_POST[myData]");
exit();
}
else
header("location: page1.php");
}
?>
If the user enters "yes" into the textbox, and then submits the form, it will still have the word "yes" in it. The key is to pass around the form data using $_POST/$_GET arrays, or using sessions. I'd recommend sessions becasue it gives you an easy way to maintain state within your applicaton.
-a9