Ajax Contact Form

How can I properly write in the PHP file and HTML page, to receive message whether the message was sent successfully or for it to display an error message? Currently the page is HTML and uses Javascript to validate it so how should I write it in the php page and javascript to display particular messages?

HTML Source:


PHP Source: