Clearing the form after validation error

Hello Everyone,
Just starting out in web design through php. Joined sitepoint forums today for getting help and helping others. :slight_smile:
Creating a test application for learning.
I have a form which have “reset” button in it.
Its working fine when i load the form .
But after submitting the data through “post”, If i get validations error my “reset” button don’t work.
It doesn’t clear the data in form . although it works fine when i load the form.
What could be the problem ???