A couple of possibilities:
1.) Post the form to itself. If any input is incorrect or not set then print the error message and the form again. If the input passes validation, then do whatever you had in mind and forward user onto the next page. The problem with this method is that if you use the "post" method for your form then you introduce a problem when the user hits the "back" button in the browser.
2.) Post the form to a pocessing PHP script. The processing script validates the input, if there's a problem then store the input in session variables and send user back to the form. If the input is OK, then do whatever you had in mind and send user to the next page. The benifit of this method is that you don't have the "back" button problem.