Jump to content

What does "Unexpected T Constant Encapsed String" mean?


collbrankid

Recommended Posts

What is wrong with my feedback.php syntax? I'm getting all sorts of messages from my host server when I try inputing info.

 

Thanks in advance.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/u2/nwkaplan30/html/feedback.php on line 114

 

Parse error: syntax error, unexpected T_VARIABLE in /home/u2/nwkaplan30/html/feedback.php on line 115

 

$messageproper =

 

"This message was sent from:\n" .

"$http_referrer\n" .

"------------------------------------------------------------\n" .

"Name of sender: $name\n" .

"Email of sender: $email\n" .

"College/University: $college\n".

"Major: $major\n" .

"Classyear: {$_POST['classyear']}\n" .

    "Find: {$_POST['find']}"

 

 

Line 114 "-----------What would you like to get our of the New Orleans Pilot Trip?-------------\n\n".

Line 115 $comments .

"\n\n------------------------------------------------------------\n" ;

 

mail($mailto, $subject, $messageproper,

"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );

header( "Location: $thankyouurl" );

exit ;

 

?>

 

 

"Classyear: {$_POST['classyear']}\n" .
    "Find: {$_POST['find']}"

 

This should be

 

"Classyear: {".$_POST['classyear']."}\n".
    "Find: {".$_POST['find']."}"

or

"Classyear: {$_POST[classyear]}\n" .
    "Find: {$_POST[find]}"

 

--

Tapos Pal

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.