LinusIT - 7:10 pm on May 22, 2012 (gmt 0)
Your exactly right, it does defeat the purpose apart from it's so easy to edit the data.
To put you in the picture, here's how the balance works:
$balance_sql="SELECT SUM(weighbridge_in) AS invalue, SUM(weighbridge_out) AS outvalue FROM weighbridge WHERE weighbridge_date >= DATE(NOW())";
$balance_result = mysql_query($balance_sql) or die(mysql_error());
$sum_in = $balance_row['invalue'];
$sum_out = $balance_row['outvalue'];
$balance = $sum_in - $sum_out;
$class = (($balance < 1000) ? 'red' : (($balance < 3000) ? 'orange' : 'green' ))
<td colspan="4"><h1 class="<?php echo $class ?>">Balance: £<?php echo number_format($balance,2); ?></h1></td>
<?php } ?>
The only way I can see of updating the balance is by refreshing the page which is quite disappointing.
Thanks for the hint, I'll update that code now.