All pastes #804536 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-03 15:46 UTC
rendered paste body
function showvat(){
		<?PHP
		$sql = "SELECT tax_rate FROM tax_rates WHERE tax_name = 'VAT'";
		$query = mysql_query($sql)
		 or die(mysql_error());
		$temp = mysql_fetch_array($query);
		?>
a = document.checkout.total_paid.value;

document.checkout.vatcharged.value = (a * (<?PHP echo $temp['tax_rate']; ?>/100)).toFixed(2)

}