To achieve that, you start from the very bedrock basics. A form submits to a php page, and that php page performs the checks, and updates the page.
Once those basics are in place, you can extract the part that performs the checks to a separate file so that it can be included, and also so that you can send an AJAX request to that same file.
The book [Bulletproof Ajax is the best one for learning how to do what you want to achieve. The web site also provides all of the [url="http://bulletproofajax.com/code/"]code and working examples](http://bulletproofajax.com/) too, of which the Contact Us example from Chapter 6 is a fully working example of the type of technique you wish to use.