Ciao ragazzi! Ho trovato in rete un codice php da implementare per creare un riquadro per inviare le mail. Solo che non sto riuscendo ad impostare alcuni campi come obbligatori ed altri no, sareste così gentili da aiutarmi? Vi ringrazio infinitamente per l'aiuto!!!! 
mail.php
Codice PHP:
<?php
include 'functions.php';
if (!empty($_POST)){
$data['success'] = true; $_POST = multiDimensionalArrayMap('cleanEvilTags', $_POST); $_POST = multiDimensionalArrayMap('cleanData', $_POST);
//your email adress $emailTo ="mail"; //"mail";
//from email adress $emailFrom ="mail"; //"mail";
//email subject $emailSubject = "form";
$name = $_POST["name"]; $email = $_POST["email"]; $comment = $_POST["comment"]; $birth = $_POST["birth"]; $prov = $_POST["prov"]; $city = $_POST["city"]; $pho = $_POST["pho"]; $imp = $_POST["imp"]; if($name == "") $data['success'] = false; if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) $data['success'] = false;
if($comment == "") $data['success'] = false;
if($data['success'] == true){
$message = "Nome & Cognome: $name<br> Email: $email<br> Messaggio: $comment <br> Data di nascita: $birth <br> Provincia: $prov <br> Città: $city <br> Telefono: $pho <br> Importo: $imp";
$headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html; charset=utf-8" . "\r\n"; $headers .= "From: <$emailFrom>" . "\r\n"; mail($emailTo, $emailSubject, $message, $headers);
$data['success'] = true; echo json_encode($data);}}
Vorrei che tutti i campi fossero obbligatori tranne comment