Please Help "Parse error: syntax error, unexpected $end in..."

Hello,

So I am new to php entirely, and have decided to run before I can walk of course!

I have a form, the contents of which I need to be emailed to me once filled in. On submit I get the following message in a new window…

“Parse error: syntax error, unexpected $end in /home/thesplat/public_html/ht_docs/pages/formtestprocess.php on line 27”

I have written the code again, checked for open brackets etc and used the extended ?php tag, I would really appreciate it if someone could take a look at the code below and see if they can understand why.

Many thanks in advance

Reego

<?php /* subject and email variables */ $emailSubject = 'rainSplats pre-order'; $webMaster = 'sales@t*****s.com'; /* gathering data varables */ $nameField = $_POST['name']; $emailField = $_POST['email']; $numberField = $_POST['pairs']; $pairsField = $_POST['pair1']; $body = <<<EOD


Name: $name
Email: $email
Number of pairs: $pairs
Colour Size: $pair1
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $submit = mail ($webMaster, $emailSubject, $body, $headers); ?>

I’m not sure if the syntax “<<<EOD” are correct, but try with:
[php]

<?php /* subject and email variables */ $emailSubject = 'rainSplats pre-order'; $webMaster = 'sales@t*****s.com'; /* gathering data varables */ $nameField = $_POST['name']; $emailField = $_POST['email']; $numberField = $_POST['pairs']; $pairsField = $_POST['pair1']; $body = "


Name: $name
Email: $email
Number of pairs: $pairs
Colour Size: $pair1
"; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $submit = mail ($webMaster, $emailSubject, $body, $headers); ?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service