Hi All, having trouble with the following and would be grateful for any assistance. This section of a multi-step form processes the sales tax. I would like to add an if, then condition that processes the $amount function with tax if the state is florida, otherwise, it processes the $amount without tax. Here is the code:
[php]<?php
require_once ‘…/config.php’;
$coffee_store_relay_url = $site_root . “process_sale.php”;
/**
- Sets the possible coffee choices.
*/
$prices_array = array(
“1 Case of Howards Best Coconut Water” => “24.99”,
“2 Cases of Howards Best Coconut Water” => “47.99”,
);
$size = “small”; // Set Default Size
if (isset($_POST[‘size’]) && isset($prices_array[$_POST[‘size’]])) {
$size = $_POST[‘size’];
}
if($state == ‘FL’)
$price = $prices_array[$size]; // Set Price
$tax = number_format($price * .07,2); // Set tax
$amount = number_format($price + $tax,2); // Set total amount
else
$price = $prices_array[$size]; // Set Price
$tax = number_format($price * .0,2); // Set tax
$amount = number_format($price + $tax,2); // Set total amount[/php]
Thanks!