[mod] Redirect to custom 'Thank you' page

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

Re: [mod] Redirect to custom 'Thank you' page

Postby stacef » 9:40pm, Sun 22 Nov, 2009

I've posted a fairly detailed explanation of how I customized my PHPList installation over here:


Please check it out; I'd love the feedback.

Posts: 9
Joined: 10:02pm, Wed 16 Sep, 2009

Re: [mod] Redirect to custom 'Thank you' page

Postby MarkA. » 3:37am, Sat 27 Feb, 2010

stacef wrote:jwgriffin-

Sure sounds like you've completed this successfully. I think most of us here understand the implications of editing core code but we haven't figured out all the steps necessary to completely customize the subscription process. Would you be interested in sharing in detail how you were able to make it work? There are a lot of folks looking for this info.


Hello Stace,

I wrote a very detailed 'step by step' post in plain language describing how to customize the subscribe, thank you and confirmation pages some time ago. It's still working fine now and is very stable.

You can see my detailed post here:

Is this what you were looking for?

As I have said before, this program is amazing, I can't thank everyone enough for making it available.

All the best, Mark
A. Mark Argentino, P.Eng., Broker
PL Geek
Posts: 80
Joined: 1:36pm, Thu 17 Feb, 2005
Location: Mississauga, Ontario, Canada

Re: [mod] Redirect to custom 'Thank you' page

Postby PaulTowlson » 4:38pm, Fri 27 May, 2011

Thanks for the advice here. I found the simplest solution from above was to modify phplist/admin/subscribelib2.php at line 342. The header line is the one I added. I hope this helps anyone still looking for an answer.

# personalise the thank you page
if ($subscribepagedata["thankyoupage"]) {
$thankyoupage = $subscribepagedata["thankyoupage"];
else {
$thankyoupage = '<h3>'.$strThanks.'</h3>'. $strEmailConfirmation;

I still need to do the same for a forward page.
phpList newbie
Posts: 1
Joined: 4:29pm, Fri 27 May, 2011

Re: [mod] Redirect to custom 'Thank you' page

Postby WDKevin » 7:04pm, Wed 19 Oct, 2011

First off, thank you to great suggestions in this thread. I've taken this one step further. We use PHPList to manage newsletters for multiple clients, so redirecting all thank you pages to one specific URL wasn't sufficient for us. In order to combat this problem and still allow for custom Thank You pages for each of our subscriptions, I've modified the code to this:

Code: Select all
if ($subscribepagedata["thankyoupage"]) {
  $thankyoupage = $subscribepagedata["thankyoupage"];
  if(substr(strtolower($thankyoupage), 0, 7) == "http://") { header("Location:".$thankyoupage); }
} else {
  $thankyoupage = '<h3>'.$strThanks.'</h3>'. $strEmailConfirmation;

Then in the text box for the Thank You page text, I put the full URL for the thank you page I wish to be redirected to. The above code looks for 'http://' in the first 7 characters of the contents of the text box and if it's find it then the user is redirected to that URL. If 'http://' is not detected then we know there is not a URL in that field and the text is displayed as usual.

I'm working on a similar work around for the confirmation page. I will post back when I have a solution.
Posts: 10
Joined: 7:00pm, Wed 19 Oct, 2011

Re: [mod] Redirect to custom 'Thank you' page

Postby schpeter » 7:50pm, Tue 18 Dec, 2012

Is there any new solution for this problem because it doesn't work for me.
phpList newbie
Posts: 3
Joined: 2:19pm, Tue 18 Dec, 2012

Re: [mod] Redirect to custom 'Thank you' page

Postby devastor » 4:05pm, Fri 13 Feb, 2015

Hey do anyone know why this code of the confirmation page:

Code: Select all
   $res .= $data["header"];
   $res .= '<.h1>'.$info.'<./h1>';
   $res .= $html;
   $res .= "<.P>".$GLOBALS["PoweredBy"].'<./p>';
   $res .= $data["footer"];
   $res = header("Location: http://www.mypage.com/new/funktion.erfolg.html");

leads to: http://www.mypage.comnewfunktion.erfolg.html ?

I miss the backslashes-> /

The thank you page works fine! I use version 3.0.12


EDIT: Doesn't matter anymore, it was my fault, because i added i redirect in the htaccess in the meanwhile, from www to non-www (if you have the same problem, delete the www. from the header location link).
PL Nut
Posts: 25
Joined: 9:46pm, Thu 05 Feb, 2015


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests