output not showing correctly

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rjhe22
Forum Newbie
Posts: 9
Joined: Fri Sep 24, 2010 9:57 am

output not showing correctly

Post 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
Last edited by rjhe22 on Fri Sep 24, 2010 12:00 pm, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: output not showing correctly

Post by John Cartwright »

$emailField is not the same as $email, etc..
rjhe22
Forum Newbie
Posts: 9
Joined: Fri Sep 24, 2010 9:57 am

Re: output not showing correctly

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: output not showing correctly

Post 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.
Post Reply