Dalbot Posted October 10, 2006 Share Posted October 10, 2006 hi there! I need help. I have a php form, and it works. The problem is, I need it to have breaks < br > between the lines in the email that gets sent. Right now it comes in like this: First Name: BobLast Name: DylanDaytime Phone Number: 111-222-3333Email Address: test@yahoo.comInterested Model: 4RunnerInterested Year: 2006Comments: This is a test. I've tried adding < br > in the code but it's not working. Maybe I'm not placing them right.How can I get line breaks?? Thanks![code]<?phprequire_once('mailclass.php');$fname = trim($_POST['f1']);$lname = trim($_POST['f2']);$phone = trim($_POST['f3']);$email = trim($_POST['f4']);$vehicle = trim($_POST['f5']);$year = trim($_POST['f6']);$comments = trim($_POST['f7']);$mymail = 'mail@xxxxxxxxxxx.com';$from = 'mail@xxxxxxxxxxxx.com';$subject = 'Contact';$content .= 'First Name: '.$fname.'';$content .= 'Last Name: '.$lname.'';$content .= 'Daytime Phone Number: '.$phone.'';$content .= 'Email Address: '.$email.'';$content .= 'Interested Model: '.$vehicle.'';$content .= 'Interested Year: '.$year.'';$content .= 'Comments: '.$comments.'';$mail = new email ( $subject, $content, "Dealersite.com", $from, $mymail);$mail->send();echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=thankyou.php">';?>[/code] Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted October 10, 2006 Share Posted October 10, 2006 Use the newline char "\n" as the line break. Don't forget to put it between DOUBLE QUOTES.Ronald 8) Quote Link to comment Share on other sites More sharing options...
Dalbot Posted October 10, 2006 Author Share Posted October 10, 2006 Thank you good sir. ;D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.