Beginner is here.
I have a form with a text box to return comments. I got a PHP script from helpvid.net to submit the form. Thus, the form is submitted to the PHP file. The form then returns the information to me via email.
The problem is that comments are sent as one large paragraph. Even if the user presses Return in the field to create a new line, the text returned in the email is on the same line. If the user presses Return twice to create a new paragraph, these paragraphs are returned as one long paragraph. I would like the text to return so that line breaks that the user inserts.
Here is the code from the PHP file that returns 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);
HTML , ?