Forums »
  Shared Hosting Wallpaper Websites For Gallery Sites »
    How To Get Sales Tax PHP Calculate Sales Tax Function Form Scripts

How To Get Sales Tax PHP Calculate Sales Tax Function Form Scripts

Description: this is a php function to help you calculate the sales tax on an order, this script is perfect for shopping carts scripts
Tags: how ,to ,get ,sales ,tax ,php ,calculate ,sales ,tax ,function ,form ,scripts
Posted On Sat Jul 28, 2007 By hostman In Shared Hosting Wallpaper Websites For Gallery Sites Forums
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="<?php echo $_POST['price']; ?>">
(example: 49.00) <br>

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

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

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

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

</body>
</html>
Sammy Tue May 21, 2013
when I ran the script the field blocks had the echo statements in them.
wallpaperama Tue May 21, 2013
thanks, i corrected it the scripts

enjoy
Information
Title: How To Get Sales Tax PHP Calculate Sales Tax Function Form Scripts
Info: This Post Has Been Viewed 0 Times Since
Date: Sat Jul 28, 2007
Author hostman Received 1 Replies #548
Related Sites
Add Your Website
Share
wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Wed Jun 19, 2013 (-8 GMT)
Powered by: Webune Forums V5