Typhoon
05-02-2002, 01:27 PM
I got fed up with running the numbers through a calculator so I made a script where you just enter the price in the URL and it deducts 2checkouts 5.5% and 0.45 cents.
any improvements would be great :)
<?php
$output2 = $price/100;
$output3 = $output2*5.5;
$output4 = $price-$output3;
$output5 = $output4-0.45;
print "The price is $".($output5)."";
?>
Maybe getting the script to round off to the nearest cent?
The script works as so -
http://www.yourdomain.com/price.php?price=5.99
My first PHP script :D
any improvements would be great :)
<?php
$output2 = $price/100;
$output3 = $output2*5.5;
$output4 = $price-$output3;
$output5 = $output4-0.45;
print "The price is $".($output5)."";
?>
Maybe getting the script to round off to the nearest cent?
The script works as so -
http://www.yourdomain.com/price.php?price=5.99
My first PHP script :D
