PDA

View Full Version : What does this error mean?


FethrdWlf
01-13-2011, 02:39 AM
Hey, I've made a contact page in DreamWeaver CS3, and the script for it will pull up, but it won't work. Here's the error my browser (Google Chrome) gives me:
Parse error: syntax error, unexpected T_VARIABLE in /www/zxq.net/f/o/o/foodquirks/htdocs/scripts/emailsend.php on line 29

Now, here' the code I'm using:
<?php

/* Email and Subject Variables */

$webMaster = 'myemail@example.com';
$emailSubject = 'Contact Message -- FoodQuirks';

/* Gathering Data Variables */

$emailForm = $_POST['email'];
$nameForm = $_POST['name'];
$subjectForm = $_POST['subject'];
$messageForm = $_POST['message'];

$body = <<<EOD
<br><hr><br>
Email: $emailForm <br>;
Name: $nameForm <br>;
Subject: $subjectForm <br>;
Message: $messageForm <br>;
EOD;

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

/* Here's the scripting to let everyone know that their email was successful. */

$theResults = <<<EOD
(For the sake of time and space, I'm replacing the HTML that should show
when you submit the email with this message, as to not add to the confusion.
Besides, line 29 is above this.)
EOD;
echo "$theResults";


?>
:confused::confused: :confused: :confused:

davidj
01-13-2011, 04:53 PM
missing line termination here....

$success = mail($webMaster, $emailSubject, $body, $headers) //<<