please help with Parse error
Posted: Tue Jul 20, 2010 6:51 am
I get the following message when I try and send an email:
error message: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\jbiddulph.com\wwwroot\iphone\send_email.php on line 10
error message: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\jbiddulph.com\wwwroot\iphone\send_email.php on line 10
Code: Select all
<?php
//change this to your email.
$to = "john.mbiddulph@gmail.com";
$from = $HTTP_POST_VARS['email'];
$subject = "email from iphone.jbiddulph.com";
//begin of HTML message
$message = <<<EOF
<html><body bgcolor="#DCEEFC"><b>$HTTP_POST_VARS['username'];</b><br><br><br>"."$HTTP_POST_VARS['message'];"."</body></html>
EOF;
//end of message
$headers = "From: "$HTTP_POST_VARS['username'];
$headers .= "Content-type: text/html\r\n";
//options to send to cc+bcc
//$headers .= "Cc: [email]maa@p-i-s.cXom[/email]";
//$headers .= "Bcc: [email]email@maaking.cXom[/email]";
// now lets send the email.
mail($to, $subject, $message, $headers);
echo "Message has been sent....!";
?>