I am using PHP's mail() function to send the results of a form via email. I cannot seem to get the \n line returns to work.
The resultant email body text just strings the results altogether on one line. I am using Outlook Express v 5.5
I have tried \n\n and \r\n and \n on its own. All produce the same results.
Perhaps it is affected by the code in the email header? If so I'd appreciate help on getting it fixed.
Here is the code:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$_POST['F_email']."\r\n";
$mailbody = "Name: ".$_POST['F_fullname']."\r\n";
$mailbody .= "Organisation: ".$_POST['F_organisation']."\r\n";
$mailbody .= "Country: ".$_POST['F_country']."\r\n";
$mailbody .= "Phone: ".$_POST['F_phone']."\r\n";
I'd also like to pass people to a thankyou page if the email is successful or an error page if not. I already know how to test for whether the mail was sent OK but have no idea how to use PHP to redirect to another html page.
any guidance is appreciated.