many thanks for the quick reply. With my little knowledge I've set up the mysql connection and used a table that already has figures in it to test the script ... it looks like this:
<?
mysql_connect ("mysql.website.co.uk", "username", "password");
mysql_select_db ("dbname");
$query = "SELECT 'item_num' FROM 'history' WHERE 1";
$result = mysql_query($query);
$total = 0;
while($row = mysql_fetch_array($result)) {
$total += $row['item_num'];
}
echo "Total Raised: \$$total";
?>
But now I'm getting this error message and I don't know how to solve it:
Warning: Supplied argument is not a valid MySQL result resource in /www.night-owl.co.uk/addup.php on line 9
Total Raised: $0
Any ideas please?
TIA ... Mick