"; while($est = mysql_fetch_object($q)){ echo"
\n"; $count ++; } echo"Page viewed $vcount times since 2nd June 2010"; include'dailyfeature.php'; ?>
\r\n";
mail('jim.rolt@googlemail.com', $subject, $error, $headers);
}
$sql = "SELECT famous.id, famous.name, birthplace, birthcounty, votes, Towns.ID FROM famous
INNER JOIN Britvotes ON Britvotes.placeID = famous.id
LEFT JOIN Towns ON Towns.Name = famous.birthplace AND Towns.County = famous.birthcounty
ORDER BY votes DESC LIMIT 100";
$q = mysql_query($sql)or mailjim("q","$sql ";
while($est = mysql_fetch_object($q)){
echo"
".mysql_error());
$top = mysql_fetch_object($q);
mysql_data_seek($q, 0);
$sql = "SELECT SUM(votes) AS total FROM Britvotes";
$tot = mysql_query($sql)or mailjim("tot", "$sql
".mysql_error());
$total = mysql_fetch_object($tot);
$pageurl = $_SERVER['REQUEST_URI'];
$cpcount = mysql_query("UPDATE pagecounter SET pagecount=pagecount+1 WHERE pageurl = '$pageurl'");
if(mysql_affected_rows()==0){$cpcount = mysql_query("INSERT INTO pagecounter(pageurl, pagecount, firstday) VALUES
('$pageurl', 1, NOW())");}
$cq = mysql_query("SELECT pagecount FROM pagecounter WHERE pageurl = '$pageurl' ");
$gcq = mysql_fetch_object($cq);
$vcount = $gcq->pagecount;
echo <<
\n";
}
include'lrform.php';
include'connect.php';
connect('','',"Britain's Favourite Person");
?>
\n";
$count ++;
}
echo"Page viewed $vcount times since 2nd June 2010";
include'dailyfeature.php';
?>