Daemon State Sales Tax Calculator
PHP Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Daemon State Sales Tax Calculator</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #999999}
-->
</style>
</head>
<body>
<h2>Daemon State Sales Tax Calculator</h2>
<p>
<?php
$tax = $_POST["tax"];
$ammount = $_POST["ammount"];
$tax2 = ($tax / 100);
$calc = ($ammount * $tax2);
$total = ($calc + $ammount);
?>
</p>
<form method="post" action="<?php echo $PHP_SELF; ?>">
<table width="344" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="112"> </td>
<td width="232"> </td>
</tr>
<tr>
<td><span class="style1">Tax:</span></td>
<td><input name="tax" type="text" id="tax" value="7.750" size="10" />
%</td>
</tr>
<tr>
<td><span class="style2">Amount</span></td>
<td><input type="text" name="ammount" id="ammount" value="<?php echo $ammount; ?>" />
$</td>
</tr>
<tr>
<td><span class="style2">Tax Total</span></td>
<td><input type="text" name="taxtotal" id="taxtotal" value="<?php echo number_format($calc, 2, ".", ""); ?>" />
$</td>
</tr>
<tr>
<td><strong>Total:</strong></td>
<td><input type="text" name="total" id="total" value="<?php echo number_format($total, 2, ".", ""); ?>" />
$</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="button" id="button" value="Calc" /></td>
</tr>
</table>
</form>
1