fourm not posting

trying to set up a fourm for my website. im geting the email but it has no content. it looks like this.

(line across the page, hr )

Email:
Name:
Title:
Message:

my code is

[php]<?php

/* Subject Email Verables */

$emailSubject = 'From Website!';
$webMaster = '[email protected]';

/* Gathering data variables */

$fnameField = $_POST['fname'];
$emailField = $_POST['email'];
$titleField = $_POST['title'];
$messageField = $_POST['message'];

$body = <<<EOD





Email: $email

Name: $fname

Title: $title

Message: $message

EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);

/* Re */

$theResults = <<<EOD
A Fresh Outlook | Thank You

Even the biggest success Starts with a first step

Thank You

We will reply within 24 hours

                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- box end -->
</div>
<div class="wrapper"></div>
Copyright © 2011 A Fresh Outlook. All Rights Reserved
Designed by Carl Smith using a template from Free-CCS

EOD;
echo “$theResults”

?>
[/php]

ive been looking at it for about 3 hours and cant find what Ive done wrong.

any help would be gratefull

sorry i relised ive deleted part of the tag [/php].

I fixed the tag. When you set the variables:

[php] $fnameField = $_POST[‘fname’];
$emailField = $_POST[‘email’];
$titleField = $_POST[‘title’];
$messageField = $_POST[‘message’];[/php]

You then use different names for them for the e-mail:

[php]$body = <<<EOD




Email: $email

Name: $fname

Title: $title

Message: $message

EOD;[/php]

You need to change them for $fnameField, $emailField etc.

thank you

Sponsor our Newsletter | Privacy Policy | Terms of Service