I added an additional text input form field with a variable name of phone & I would like name to also print to the body of the email, so I added the following but must have broken as I didn’t get my test. The comments field has a variable name of message
$name = $_POST[“name”];
$phone = $_POST[“phone”];
$message = $_POST[“message”];
// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $name, $phone, $message, $headers);
Before:
// now we can add the content of the message to a body variable
$message = $_POST[“message”];
// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);