korvix Posted February 24, 2010 Share Posted February 24, 2010 Hi, I'm trying to insert a hyperlink into a php generated email message. $message = "Hi, check this out <a href="http://www.website.com">click here</a>"; I was able to just place a link, but when I add hyperlink it doesn't work for me, can someone help ? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted February 24, 2010 Share Posted February 24, 2010 double quotes within double quotes must be escaped echo "this is a <a href=\"$domain\">link</a>"; HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
korvix Posted February 24, 2010 Author Share Posted February 24, 2010 Thanks for helping but still doesn't work for me ? Can you post it as an example command because I have very basis php knowledge Quote Link to comment Share on other sites More sharing options...
korvix Posted February 25, 2010 Author Share Posted February 25, 2010 According to your suggestion I've made this line code $message = "Hi, check this out <a href=\"http://www.website.com\">click here</a>"; This still ISNT working for me HELP Quote Link to comment Share on other sites More sharing options...
Deoctor Posted February 25, 2010 Share Posted February 25, 2010 u have to send headers along with the message body.. the headers should be something like this $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.