Page 1 of 1

output not showing correctly

Posted: Fri Sep 24, 2010 11:58 am
by rjhe22
Hi
i cannot get the out put to show correct or get it to put in what i fill in in my from.
here is part of my code not working right

Code: Select all

/* subject and email*/

	$emailSubject = ' crazy email scripting !';
	$webMaster = '';
	
/* getting data */

	$emailField = $_POST['email'];
	$nameField = $_POST['name'];
	$phoneField = $_POST['phone'];
	$budgetField = $_POST['budget'];
	
	
	$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone: $phone <br>
Budget: $budget <br>
EOD;

here is the output im getting

Code: Select all

<br><hr><br>
Email:  <br>
Name:  <br>
Phone:  <br>
Budget:  <br>
anyone any ideas really need help

Re: output not showing correctly

Posted: Fri Sep 24, 2010 11:59 am
by John Cartwright
$emailField is not the same as $email, etc..

Re: output not showing correctly

Posted: Fri Sep 24, 2010 12:02 pm
by rjhe22
that worked cheers. that has been wrecking my head.

on other thing the <br> keep showing up as well in the mail anyway of stopping this

Re: output not showing correctly

Posted: Fri Sep 24, 2010 12:03 pm
by John Cartwright
rjhe22 wrote:that worked cheers. that has been wrecking my head.

on other thing the <br> keep showing up as well in the mail anyway of stopping this
Either convert them to newlines \r\n or send the appropriate headers to signify that the email contains html content, and should be treated as such.