‘; } $string_exp = “/^[A-Za-z .’-]+$/”; if(!preg_match($string_exp,$name)) { $error_message .= ‘Il nome inserito non è valido.
‘; } if(strlen($error_message) > 0) { died($error_message); } $email_message = “Dettagli FORM: \n\n”; function clean_string($string) { $bad = array(“content-type”,”bcc:”,”to:”,”cc:”,”href”); return str_replace($bad,””,$string); } $email_message .= “Nome: “.clean_string($name).”\n”; $email_message .= “Email: “.clean_string($email_from).”\n”; // email headers $headers = ‘From: ‘.$email_from.”\r\n”. ‘Reply-To: ‘.$email_from.”\r\n” . ‘X-Mailer: PHP/’ . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); } ?>