PDA

View Full Version : Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING


jennaramondo
12-02-2009, 12:16 AM
Hi there,

I am having trouble with my website. I'm a beginner with Dreamweaver so simplified answers are much appreciated. When you click 'send' on the contact form (which was created with a php file) it comes up with the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/kerrikin/public_html/mail.php on line 32

My code for the php file - I hate noted line 32 in BOLD PURPLE (note, this isn't actually written in my code):

<body>

"<?php
//variables (change these)

$youremail = "email address";
// your email address

$subject = "Website Email";
// the subject of the email

$thankyou = "thankyou.html";
// thank you page

// don't change anything else

;if($email == ""){
?>
No email address added. Please go back.<br/>
"<?php
;}elseif($name == ""){
"?>
No name added. Please go back.<br/>
<?php
;}elseif($message == ""){
"?> LINE 32
No message added. Please go back.<br/>
"<?php
;}else{

$msg = ereg_replace("\\\'", "'", $message);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $name\nemail: $email\nmessage:\n$msg1";

mail($youremail, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
?>
<meta http-equiv="refresh" content="0; url=<?echo $thankyou;?>"">
"<?php
}
"?>

</body>
</html>

edbr
12-02-2009, 01:40 AM
No message added. Please go back.<br/>
"
lose the "

edbr
12-02-2009, 07:36 AM
i removed the email address