I am an Ultra Newbie! and have a question.
I need to make a modification to a PHP driven shopping cart. The problem with the cart is that it charges sales tax to every state and country, that's bad!
What I want to do is have it only charge state X sales tax. The line that cart uses to charge sales tax is:
$pre_total_tax = $cart_total * ($site_tax/100);
$site_tax is the tax rate pulled from the database ex. 8.25
How do I add a if..else to this so that if $state == X then $site_tax/100. If $state does not == X then "0"?
I should also make it sensitive to state variations a user may type, ex. FL, Fl, Flordia, FLORDIA. I would do a drop down for the state but I don't want to limit myself to just the US.
"If..else" is probably not the right command but I hope my objective makes sense.
The whole thing sounds do able I just don't know enough to look at it properly.