Hi I have this session start in the index.php of my webshop, (multilingual version available on demand) and picking up the variable $ref in the mail.php. This I do to see wether if one comes from within the site or from a search engine. However, the last character of the value of $ref always comes out wrong. Does anyone know why?
Both little scripts are in the verey top of the page before any header info or html. No errors come up when executing the scripts.
Thanks in advance, Leendert Van Gemeren III, WebMaster www.vangemeren.nl
[index.php]
<?php
session_start();
if (!isset($SESSION['userinfo'])) {
$SESSION['userinfo'] = 0;
$ref = $SERVER['HTTP_REFERER'];
if($ref == ""){
$ref = "none";
}
if($user == ""){
$user = "none";
}
$SESSION["userinfo"] = $ref;
} else {
$_SESSION['userinfo']++;
}
?>
[mail.php]
<?
session_start();
$ref =$_SESSION["userinfo"];
?>