I'm trying to send a copy of a submitted form to the user of the client-side. I tried implementing some code I already found around here but can not get it to work successfully. Would you guys mind taking a look? ...All input appreciated, as always!
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "nonedesigns@gmail.com";
$email_subject = "SuitUP | Support";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
if ($success)
mail($email_from, $Subject, $Body, "From: <$email_From>");
// validation expected data exists
$error_message = "";
//get fields, and check if they are filled
$project_name = $_POST['first_name'];
required_field($project_name,"Project Name");
$last_name = $_POST['last_name'];
required_field($last_name,"Last Name");
$email_from = $_POST['email'];
required_field($email_from,"Email");
$contact_reason = $_REQUEST['contact_reason'];
$other_info = $_POST['other_info'];
required_field($other_info,"Additional Info");
//phone number manip
$phone_number_clean = clean_phone_number($phone_number);
//email manip
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';