i have a <?php include 'stats.php'; ?> on every page on my site. in the stats.php file there is a SQL Insert query that inserts data into a table in my database.
for some reason when visiting just one page it inserts 4 rows into the database - there is only one SQL Command.
why would it be doing this... below is ALL the code on the stats.php file
<?php
   $activity_history_sql=
      "INSERT into user_activity_history (user_seq, user, timestamp, ip_address, user_request_uri, 
              user_script_filename, user_script_uri, user_script_url, user_script_name, user_php_self) 
       values ('".$_SESSION["domain.co.uk"]["sequence"]."', 
             '".$_SESSION["domain.co.uk"]["forename"].' '.$_SESSION["domain.co.uk"]["surname"]."', 
             '".date("Y-m-d H:i:s")."', 
             '".$_SERVER["REMOTE_ADDR"]."', 
             '".$_SERVER["REQUEST_URI"]."', 
             '".$_SERVER["SCRIPT_FILENAME"]."', 
             '".$_SERVER["SCRIPT_URI"]."', 
             '".$_SERVER["SCRIPT_URL"]."', 
             '".$_SERVER["SCRIPT_NAME"]."', 
             '".$_SERVER["PHP_SELF"]."') ";
    $activity_history_rs=mysql_query($activity_history_sql,$conn) or die(mysql_error());
?>
 
     
    