Jump to content

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

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.