Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING


Recommended Posts

I am trying to "Add email to tell-a-friend",.. so that when someone goes on my site and emails a friend my website,.. it also email me telling me they have used this feature.


I have added the following code (which is also in the .pdf documentation on page 57):


//Mail a (silent) report to the web owner:


//get ip

if(getenv('HTTP_X_FORWARDED_FOR')) {


} else {




//build report

$report = 'Here are the details of the T.A.F. sumission by'.$from_name.'on'.date("D M j G:i:s Y").


$report.="nn".'Recipient details:'.$HTTP_POST_VARS['friendname'].'-'.


$report.="n".'Sender details:'.$from_name.'-'.$from_email_address;

$report.="n".'Sender ip address:'.$ip;

$report.="n".'Personal message:'."nn".$HTTP_POST_VARS['yourmessage'];

$report.="nn".'Product link:'.HTTP_SERVER.DIR_WS_CATALOG.



//mail report

tep_mail('Tell A Friend','[email protected]','[REPORT] Tell a Friend Usage',stripslashes($report),



I followed the instructions,.. but I am getting the above error on the line after this code (which I did not change).


The next line of code reads:


$messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected($to_name)), 'success');



Any help would be wonderful!!

Link to comment
Share on other sites


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

  • Create New...