lundi 20 avril 2015

Display Different Phone # based referring page (PHP or JS)

I need your help.

I want to show different phone # based on what page (within same site) user came from.

Everthing will take place within same website.

All users will come to same page - misite.com/phone.php

Example:

  • If user came from misite.com/page1.php, show phone number 1
  • If user came from misite.com/page2.php, show phone number 2
  • If user came from misite.com/page3.php, show phone number 3

Else, show default phone number (if I do not list a specific page).

I guess it will ba a if / elseif statement, but i'm not a coder and don't know how to sturcture it correctly.

I'm looking for example of code please.

I also thing I will need to us to use $_SERVER['HTTP_REFERER']; for this.

Thank you for any help!

Aucun commentaire:

Enregistrer un commentaire