i have try use this code but no display...
<?php
function addTotal()
{
$sql="select amount from details";
$result=mysql_query($sql)or die(mysql_error());
while($r=mysql_fetch_assoc($result))
{
@$expenses=$r['expenses'];
@$total=$expenses+$total;
}
}
?>