It sounds as if you are doing your error handeling on a second page from the origional form. But it also sounds as if your form is a PHP page, thus you can just do the error handeling on the first page or you can display the same form from the second page with your error messages.
If you want to check the errors on the same page as the form just submit the form to itsself at the top of the page you can check to see if the variable $HTTP_POST_VARS or $_POST is set, letting you know if the form has been submited, if so then check for errors.
If you chose the second option, of checking for errors on a second page, then do something like
$error = 0;
If there is an error {
$error = 1;
}
If ($error == 1) {
displayErrorForm
}
where your displayErrorForm shows the exact same form as the previous page, but this time it shows and error with the fields they need to fill in.
Let me know if this helps
PD