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 ? Link to comment https://forums.phpfreaks.com/topic/193206-how-to-insert-hyperlink-in-php-email-message/ 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 Link to comment https://forums.phpfreaks.com/topic/193206-how-to-insert-hyperlink-in-php-email-message/#findComment-1017439 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 Link to comment https://forums.phpfreaks.com/topic/193206-how-to-insert-hyperlink-in-php-email-message/#findComment-1017447 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 Link to comment https://forums.phpfreaks.com/topic/193206-how-to-insert-hyperlink-in-php-email-message/#findComment-1017852 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"; Link to comment https://forums.phpfreaks.com/topic/193206-how-to-insert-hyperlink-in-php-email-message/#findComment-1017859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.