I have used the php below to show a different telephone number in the header of the site depending upon where the visitor comes from. The code below works but looses the original referrer information upon click of own site links, defaulting the telephone number back to the generic number.
Is there away to save it to the session, maybe the start session and save session is not done correct?
Thanks for any help
................................................. ............................
<?PHP
session_start();
if(!isset($_SESSION[’referrer’])){
$referer = strtolower($_SERVER["HTTP_REFERER"]);
if (strstr($referer,"site1"))
{
echo("<h1>Telephone Number1</h1>");
}
else if (strstr($referer,"site2"))
{
echo("<h1>Telephone Number2</h1>");
}
else if (strstr($referer,"site3"))
{
echo("<h1>Telephone Number3</h1>");
}
else if (strstr($referer,"site4"))
{
echo("<h1>Telephone Number4</h1>");
}
else
{
echo("<h1>Telephone Number5</h1>");
} $_SESSION[’referrer’] = $referrer; // store session data
}?>
SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here is the tutorial
Get content from table into a list, without repeating.
Alright this is kinda an odd thing, so I need some help.I have a table "quote" with the three columns `id`, `quote`, and `author`.Now I am wondering if there is anyway that I can output all
Help with file_get_html
The following code gives the expected results:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Schedule editor
Hi,
Unexpected T_Variable ?
Hi all,I dont really know what I am doing!! I know I'm doing something wrong, and I know its on line 42 "$sql="select pname, award, aw_year" but I dont know why its a problem?? Can
UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbnails in different folders however it is uploading the image and saving it in the folder /photos/ then
Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values in the array; I keep getting an undefined index. Something is not right, but the code is so simple!
how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating
Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a result set with pagination. The first page results (first 10 records) will update with the batch, but
HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.