Thread: PHP Form Mail
View Single Post
  #2 (permalink)  
Old Sep 22nd, 2006, 21:28
ukgeoff ukgeoff is offline
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP Form Mail

If this layout is exactly as in your code then that is exactly what will happen.

PHP is adding the newline/carriage returns and the tabs/spaces of your code to your $body variable.

PHP thinks that everything upto the ';' is part of the line of code.

If you want to write your code like this for clarity, then make each line a php line in its own right and build your $body content as you go. See example code:
Code: Select all
$body = 'first line of code';
$body .= 'second line of code';
...
and so on.
Reply With Quote