<?php
$data = isset($_POST['data']) ? $_POST['data'] : false;

$to      = 'juanlajara@gmail.com';
$name    = isset($data['name']) ? $data['name'] : false;
$email   = isset($data['email']) ? $data['email'] : false;
$message = isset($data['message']) ? $data['message'] : false;
$subject = "Formulario - World Dj Fest"." "."$email";
$matter  = "Nombre:"." "."$name"."\n\n".
           "Email:"." "."$email"."\n\n".
           "Sugerencia:"." "."$feedbacknew"."\n\n";

if($name && $email && $message) {
	mail("$to", "$subject","$matter","From: $email");
	$response[] = array
	(
		'message' => 'success'
	);
} else {
	$response[] = array
	(
		'message' => 'empty'
	);
}
echo json_encode($response);
flush();
?>