Beginner here.
I have a form with a textarea to return comments. I got a PHP script from helpvid.net to send the form to. So, the form is being sent to a PHP file.The form then returns the information to me in an email.
Problem is that the comments are sent as one large run-in paragraph. Even if the user hits Return in the field to make a new line, the text returned in the email is on one line. If the user hits Return twice to make a new paragraph, those paragraphs are returned as one long paragraph. I would like the text returned to have the line breaks that the user puts in.
Here is the code form the PHP file that is returning the comments:
$name = $_POST['name'];
$company = $_POST['company'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$email = $_POST['email'];
$optin = $_POST['optin'];
$comments = $_POST['comments'];
$body = <<<EOD
<br><br>
Please send samples to: <br /><br />
$name <br />
$company <br />
$address <br>
$city, $state $zip <br><br />
Email: $email <br><br />
Opt-In to occasional email list?: $optin <br><br />
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
Is there a way to modify this code, or my HTML file to return the paragraph breaks?