Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-05-2012, 08:28 PM   PM User | #1
constantgamer24
New to the CF scene

 
Join Date: May 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
constantgamer24 is an unknown quantity at this point
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?
constantgamer24 is offline   Reply With Quote
Old 06-05-2012, 09:12 PM   PM User | #2
chunky
New Coder

 
Join Date: Apr 2012
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
chunky is an unknown quantity at this point
Quote:
Originally Posted by constantgamer24 View Post
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 ">" )
chunky is offline   Reply With Quote
Users who have thanked chunky for this post:
constantgamer24 (06-06-2012)
Old 06-06-2012, 02:14 AM   PM User | #3
constantgamer24
New to the CF scene

 
Join Date: May 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
constantgamer24 is an unknown quantity at this point
Thank you very much. I missed that >
constantgamer24 is offline   Reply With Quote
Reply

Bookmarks

Tags
link, list, mailing, mailing list, unsubscribe

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:04 PM.


Advertisement
Log in to turn off these ads.