rstrik Posted June 14, 2006 Share Posted June 14, 2006 Hello,I'm trying to embed a link in a form I'm creating but keep getting an error message that says:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\web\lostpw.php on line 61Here is the code portion I'm using: I'm not including the entire document, don't think it's relevant to my error.[code]$mailer->Message = "Dear $first_name,\n\n"."You have requested a new password for My PHP Site. "."Below is your new login information:\n\n"."==========================\n"."Username: $username\n"."New Password: $newpass\n"."==========================\n\n"."You may login at any time "."at http://$_SERVER['SERVER_NAME']/login.php\n\n}"."Thank You!\n"."My PHP Site Administrator";$mailer->SendMail();[/code]Line 62 error is pointing to the "at http://$SERVER['SERVER_NAME']/login.php\n\n"Is there a better way to write this line? I'm using a book to help me and I think it may be wrong. Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/11940-help-embedding-a-link-into-an-email/ Share on other sites More sharing options...
poirot Posted June 14, 2006 Share Posted June 14, 2006 Change:[code]"at http://$_SERVER['SERVER_NAME']/login.php\n\n}".[/code]to[code]"at http://{$_SERVER['SERVER_NAME']}/login.php\n\n}".[/code] Link to comment https://forums.phpfreaks.com/topic/11940-help-embedding-a-link-into-an-email/#findComment-45313 Share on other sites More sharing options...
rstrik Posted June 14, 2006 Author Share Posted June 14, 2006 [!--quoteo(post=383567:date=Jun 13 2006, 08:27 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 13 2006, 08:27 PM) [snapback]383567[/snapback][/div][div class=\'quotemain\'][!--quotec--]Change:[code]"at http://$_SERVER['SERVER_NAME']/login.php\n\n}".[/code]to[code]"at http://{$_SERVER['SERVER_NAME']}/login.php\n\n}".[/code][/quote]Works perfectly, thanks alot for your help. Link to comment https://forums.phpfreaks.com/topic/11940-help-embedding-a-link-into-an-email/#findComment-45320 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.