kylebellamy
Programmer
I came across this form and it's working fine as a contact form but the email I receive is all one long string of text.
I know that \n is the code for a new line but I can't figure where to put it in this. Either the form crashes or the entry disappears.
Any thoughts?
I know that \n is the code for a new line but I can't figure where to put it in this. Either the form crashes or the entry disappears.
Code:
$mail_recipient = "kyle.bellamy@gmail.com";
$mail_subject = "Contact Me";
$name = Trim(stripslashes($_REQUEST['name']));
$email = Trim(stripslashes($_REQUEST['email']));
$phone = Trim(stripslashes($_REQUEST['phone']));
$message = Trim(stripslashes($_REQUEST['message']));
$Body = "";
$Body .= $name;
$Body .= $email;
$Body .= $phone;
$Body .= $message;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// send email
$success = mail($mail_recipient, $mail_subject, $Body, $headers);
if($success==true)
header('Location: /test4/index.html');
else
header('Location: /test4/index.html');
Any thoughts?