Not a problem, we all have to start somewhere.
I've quickly put this together for you, add it to the bottom of your page (before the </body>)
<script>
// Catch the form being submitted, I added an ID value (contact_form) to the form, as there are two forms on this page
$('#contact_form').submit(function(){
// get the data from the form
var first_name = $('input[name=first_name]', '#contact_form').val();
var last_name = $('input[name=last_name]', '#contact_form').val();
var email = $('input[name=email]', '#contact_form').val();
var telephone = $('input[name=telephone]', '#contact_form').val();
var comments = $('input[name=comments]', '#contact_form').val();
// build the data json object to send to the server
var data = {
first_name: first_name,
last_name: last_name,
email: email,
telephone: telephone,
comments: comments
}
// Send the request to the server
$.ajax({
type: 'POST',
url:'/contacthandler.php', // Your end point
data: data, // our data from the form as json
success: function(response){
// If the server response with success do this...
// response is the 'returned' data, whatever the page would have rendered
alert('Success Message');
}
})
.fail(function(response){
// if something went wrong do this...
alert("Oops, something went wrong");
});
// stop the form from being submitted
return false;
});
</script>