I am using this script for getting my cookie variables out and gathering who visits which page. The script works great when I call it directly but as soon as I include it in any way it no longer works. Ideas?
<?
if (isset($_COOKIE['power_campus_num'])){
$id = $_COOKIE['power_campus_num'];
$fname = $_COOKIE['first_name'];
$lname = $_COOKIE['last_name'];
$page = $PHP_SELF;
$date = time();
$dbdate = date("m/d/y G.i:s", $date);
include '/var/www/html/phplib/mysql_connect.php';
mysql_query ("INSERT INTO admissions_stats (people_code_id , first_name , last_name , file , date)
VALUES ('$id' , '$fname' , '$lname' , '$page' , '$dbdate')");
include '/var/www/html/phplib/close.php';
print "<!--Hit Logged-->";
}
?>
Thanks,
Chris