menu displays - until adding stats tracking
Hi
I've successfully added the menu to pages, but as soon as I add the following code, the rest of the page displays properly, but the dynamic menu does not.
<?
$con = mysql_connect("localhost","*******","*********");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("******", $con);
mysql_query("UPDATE HomepageHits SET HomepageHits = HomepageHits +1
WHERE ClubID='$_GET[ClubID]'");
//collect information...
$browser =$_SERVER['HTTP_USER_AGENT']; // get the browser name
$ip = $_SERVER['REMOTE_ADDR']; // get the IP address
$from_page = $_SERVER['HTTP_REFERER'];// page from which visitor came
$club = $_GET['ClubID'];
// Query for getting visitor countrycode
$country_query = "SELECT COUNTRY_CODE2 FROM iptoc ".
"WHERE IP_FROM<=inet_aton('$ip') ".
"AND IP_TO>=inet_aton('$ip') ";
$country_exec = mysql_query($country_query);
$ccode_array=mysql_fetch_array($country_exec);
$country_code=$ccode_array['COUNTRY_CODE2'];
//Insert the data in the table...
$query_insert ="INSERT INTO pagestats
(browser,ip,date_visited,from_page,country,ClubID) VALUES
('$browser','$ip',now(),'$from_page','$country_code','$club')" ;
$result=mysql_query ( $query_insert);
if(!$result){
die(mysql_error());
}
mysql_close($con);
?>
Any ideas on what i need to change either in the css menu file or the code above?
Many thanks