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 = <<<EODName: $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); ?>