Im writing a application that takes a form and sends it in a email using the PHP mail() function. Well im using the \n to make new lines, the thing is sometimes it works and sometimes it doesnt. the code as at the bottom.
Now everything works. when i press submits, it works. when I look at the mail however I see everything has a new line up to the point where I add the string
"Does the vehicle run and drive as is"
from that point on, the new line doesnt work.
Here is the strange thing. If i put double new lines like this "\n\n" and like i did on the $_POST['info4'] line. it works, and every newline past that new line works. but if I just make it one newline, it doesnt work. and every new line past that line doesnt work as well
This is what ive tried so far
changing back and fourth from double quotes to single quotes
creating space within the quotes From this: "\n" to this " \n " still doesnt work
Using break like this "<br>" . still doesnt work.
The only thing works is this "\n\n" but it makes 2 lines and I only want to make one line. does anyone know whats going on ?
$comments .= "make: ".$POST['make']."\n";
$comments .= "model: ".$POST['model']."\n";
$comments .= "license: ".$POST['license']."\n";
$comments .= "vin: ".$POST['vin']."\n";
$comments .= "Car Info: ".$POST['info']." ".$POST['info2']." ".$POST['info3']." ".$POST['info4']." \n \n";
/everything above works, below doesnt /
$comments .= "Does the vehicle run and drive as is? ".$_POST['drive']. "\n";
if ($_POST['drive'] == 'no') {
$comments .= "Reason Being: ".$_POST['drive_details']."\n";