How to add my website to Confirm page

Solutions for other advanced phplisters

How to add my website to Confirm page

Postby hotel » 7:13am, Wed 02 Sep, 2009

In index.php, I have added a new last line to function confirmPage:

Code: Select all
  $res .= '<p>Return to web site <a href="http://www.mysite.com">www.mysite.com</a></p>';
  return $res;
}


That works OK.

My question is how can I make this generic so it gets the website name automatically?
I tried using $_SERVER['SERVER_NAME'] but without success.

Can anyone show me how to do it?
hotel
phpLister
 
Posts: 14
Joined: 9:25am, Wed 12 Aug, 2009

Re: How to add my website to Confirm page

Postby Heritage » 12:58pm, Wed 02 Sep, 2009

I am not a PHP expert, but I think your looking for:

HTTP_HOST

<?php echo $_SERVER['HTTP_HOST']; ?>
Heritage
Moderator
 
Posts: 223
Joined: 3:25pm, Fri 23 Jun, 2006
Location: 800 720-7301

Re: How to add my website to Confirm page

Postby hotel » 6:35am, Thu 03 Sep, 2009

Yes, HTTP_HOST was what I needed.

Many thanks.
hotel
phpLister
 
Posts: 14
Joined: 9:25am, Wed 12 Aug, 2009

Re: How to add my website to Confirm page

Postby Wooper2340 » 8:49am, Fri 19 Nov, 2010

I'm a newbie to PHP and so far this has been great (the script) and very easy to setup, but I was wondering how to change the URL after successfully logging in, or including more in main.php after logging in. I tried to just replacing $session->referrer with a URL but it didn't work, or is that not what I was supposed to do? Any help would be much appreciated.
Wooper2340
phpList newbie
 
Posts: 3
Joined: 9:27am, Wed 17 Nov, 2010

Re: How to add my website to Confirm page

Postby kingtone » 8:20pm, Mon 21 Feb, 2011

thanks, i was trying to figure out how to do this.

however- a few questions on this from a php neophyte...

Is there a way to make this work globally for all the public pages (subscibe, confirm etc)?

I'd really like to have the link replace the "powered by'" line in the body under the input box - seeing that there are 'powered by's" already in the header and footer (which look fine and will stay).

also, where in the index.php page code do you put this?

thanks,

lucio
kingtone
phpList newbie
 
Posts: 1
Joined: 8:11pm, Mon 21 Feb, 2011


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest