How To Get Sales Tax Php Calculate Sales Tax Function Form Scripts
how to get sales tax php calculate sales tax function form scripts
how, to, get, sales, tax, php, calculate, sales, tax, function, form, scripts
How To Get Sales Tax Php Calculate Sales Tax Function Form Scripts
Post Description: how to get sales tax php calculate sales tax function form scripts
POST# 739
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: How To Get Sales Tax Php Calculate Sales Tax Function Form Scripts
today i was writing a script for a shopping cart and ofcourse, i need to figure out how to show the sales tax for a price, so i came up with this simple easy to use script you can use for your website if you need to find out how you can get the tax for your state for example.

here is the script: just copy and paste into a text editor like notepad and save it as webune-tax.php then upload to your wesbite and open it with your broswer and see it in action.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sales Tax Function</title>
</head>

<body>

<p>This Function Script Created By Webune.com</p>
<p><img src="http://www.webune.com/images/headers/default_logo.jpg"></p>
<form name="form1" method="post" action="">

Price:<br>
<input type="text" name="price" value="<? echo $_POST['price']; ?>">
(example: 49.00) <br>

<br>
Enter Sales Rate:<br>
<input type="text" name="tax_rate" value="<? echo $_POST['tax_rate']; ?>">
(example: 8.25) <br>

<br>
<input type="submit" name="Submit" value="Submit">
</form>
<hr width="200" align="left">

<?
$Subtotal = $_POST['price'];
$Tax = round( (($_POST['price'] * $_POST['tax_rate']) / 100 ), 2);
$Total = ($Tax + $Subtotal);
?>
Subtotal: $<? echo $Subtotal; ?><br>
Tax : $<? echo $Tax; ?><br>
Total: $<? echo $Total; ?><br>

<p align="center"><a href="http://www.webune.com">More Free PHP Scripts &gt;&gt;</a> </p>

</body>
</html>
Share:
BBCODE:
HTML Code:


No Repies
(0) Comments for How To Get Sales Tax Php Calculate Sales Tax Function Form Scripts

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload