<?php

// variables
$message = $_POST['message'];
$docsite = $_POST['hostname'];
$url = $_POST['url'];

// email
$from = 'Feedback Form';
$to = 'maj@vizrt.com';
$subject = 'New Feedback regarding $docsite';
$body = "You have received feedback regarding the following page: $url\n Message: \n $message";

// validation
if (!$_POST['message']) {
	$errMessage = "Please enter your feedback message.";
}

if (!$errMessage) {
	if (mail ($to, $subject, $body, $from)) {
		$result='<div class="alert alert-success">Thank You! I will be in touch</div>';
	} else {
		$result='<div class="alert alert-danger">Sorry there was an error sending your message. Please try again later</div>';
	}
}


 ?>