i can't work out what's wrong with this:
<?
function hit_count() {
/* unique hit counter */
setcookie (cookie, count, time()+604800);
$count = $HTTP_COOKIE_VARS['count'];
if (!$count){
mysql_pconnect("$host","$user","$pass");
mysql_select_db("$base");
$result = mysql_query("SELECT * FROM $prefix" . "count");
while($r=mysql_fetch_array($result))
{
$count=$r["count"];
$count++;
mysql_query("UPDATE $prefix" . "count SET count='$count' WHERE id=1");
}
echo ('$count unique visits');
}
?>
anyone know?... thanks