Jump to content

Missing new lines sometimes


TedT

Recommended Posts

Hi,

I am not a PHP programmer, but have been trying to get a contact form to work on my website.  The PHP script for sending the form is from a public site.  It gets user input and emails it.

 

The problem is sometimes the email has the user input on seprate lines, and sometimes 2 or more lines are run together making it hard to read.

 

The code has a period at the end of each line (and I can't find any PHP info to say why).  Here is the the email code:

 

$messageproper =

 

"This message was sent from:\n" .

"$http_referrer\n" .

"------------------------------------------------------------\n" .

"Name of sender: $name\n" .

"Company Name: $company\n" .

"Phone: $phone\n" .

"Email of sender: $email\n" .

"Email confirmation: $emailconfirm\n" .

"Heard of us through: $through\n" .

"Add to mailing list: $mailinglist\n" .

"Is this a technical problem: $techproblem\n" .

"------------------------- COMMENTS -------------------------\n\n" .

$comments .

"\n\n------------------------------------------------------------\n" ;

 

mail($mailto, $subject, $messageproper,

 

Are the periods a mistake an causng problems?  Sometime 3 lines are all run together in the email, sometimes it is OK.

Thanks for any help.

Ted

Link to comment
https://forums.phpfreaks.com/topic/110217-missing-new-lines-sometimes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.