CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Mailing list unsubscribe as linked text? (http://www.codingforums.com/showthread.php?t=263719)

constantgamer24 06-05-2012 08:28 PM

Mailing list unsubscribe as linked text?
 
I am trying to get it so that when I send a eMail out to my subscribers through my php mailing list; there will be an unsubscribe link. Currently I am doing so by using

PHP Code:

$unSub "Unsubscribe: http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}";

$body "Greetings, $upperUser\n\n{$message}\n\n${unSub}"

Which works but its result is messy. Is there a way that I can make it so the text "Unsubscribe" is linked to http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}

I've tried
PHP Code:

$unSub "<a href="http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}"Unsubscribe</a>" 

but can't seem to get that to work. Is there something I am doing wrong with this syntax?

chunky 06-05-2012 09:12 PM

Quote:

Originally Posted by constantgamer24 (Post 1237131)
I've tried
PHP Code:

$unSub "<a href="http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}"Unsubscribe</a>" 

but can't seem to get that to work. Is there something I am doing wrong with this syntax?

you will need backslashes around the href, like:
PHP Code:

$unSub "<a href=\"http://www.openkonga.org/mailing_list/unsubscribe.php?eMail={$user['eMail']}\">Unsubscribe</a>" 

(You also missed an ">" )

constantgamer24 06-06-2012 02:14 AM

Thank you very much. I missed that >


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.