Thats very easy dude! I hope you know how to connect to a database with PHP, and brief me about the type of fields you want to validate, and the structure of the form.
Validation using JavaScript and returning results from the MySQL databse, both are fairly simple to implement.
Checkout the PHP and JavaScript forums, you'll find a lot of threads on form validation and database connectivity,retrieval.In case that doesn't help you, let me know, and also post your code snippet.