YouFail
20-12-2006, 05:30 PM
Ok.
Im coding a script and after you order it adds on 17.5% VAT. But this causes problems and gives out a number. Something like $29.36325 when it should be $29.36
$vat = 24.99 / 100 * 17.5;
$gt = $vat + 24.99;
echo ("You ordered $_POST[iname]. The price is $24.99 (excluding VAT). The grand total is $$gt ");
Thats the code im using. If anybody could help me it'd be great. I tried a few codes but nothing so far has worked.
Im coding a script and after you order it adds on 17.5% VAT. But this causes problems and gives out a number. Something like $29.36325 when it should be $29.36
$vat = 24.99 / 100 * 17.5;
$gt = $vat + 24.99;
echo ("You ordered $_POST[iname]. The price is $24.99 (excluding VAT). The grand total is $$gt ");
Thats the code im using. If anybody could help me it'd be great. I tried a few codes but nothing so far has worked.