Ajax Contact Form

phpscripts

#1

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:

https://hastebin.com/nolonanoqa.html

PHP Source:

https://hastebin.com/joviqahixo.php