Jump to content

How to get breaks in form email?


Dalbot

Recommended Posts

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]
<?php
require_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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.