Forum Moderators: coopster
$message = $_POST["address"] . $_POST["postcode"] . $_POST["telephone"] . $_POST["day"] . $_POST["month"] . $_POST["year"] . $_POST["source"] . $_POST["message"] . $_POST["name"];
mail($sendTo, $subject, $message, $headers);
?>
When I get the email through all appears all on one line with no spaces, I need to separate each to a new line. Any help is much appreciated. Thanks.
For example:
$_POST["address"]." \n ".$_POST["postcode"]." \n " .$_POST["telephone"]." \n ".$_POST["day"].$_POST["month"].$_POST["year"] ." \n ".$_POST["source"]." \n ".$_POST["message"]." \n ".$_POST["name"];
It's important to note that when using \n, you must have it in between double quotes (") not single quotes ('). The newline command will not work if you place it in between single quotes.
Correct: " \n "
Incorrect: '\n'
-JB