View Full Version : What does this error mean?

01-13-2011, 01: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:

/* 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
Email: $emailForm <br>;
Name: $nameForm <br>;
Subject: $subjectForm <br>;
Message: $messageForm <br>;

$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.)
echo "$theResults";

:confused::confused: :confused: :confused:

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

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