Re: case
| From: | James Kupernik | Date: | Tue, 11 Jun 2002 14:22:45 +0000 |
| Subject: | Re: case | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19744@lists.php.net to get a copy of this message | ||
PLEASE IGNORE!
Thanks!
"James Kupernik" <kupernik@bcn.net> wrote in message
news:20020611141538.23613.qmail@pb1.pair.com...
> I want to test a value that was typed into a form, but I don't want the
case
> to be a problem, how can I get around this??
>
> This is what I have now:
>
> function calculate_tax($OrderedByState,$ShipState)
> {
> global $totalPrice;
> //tax calculation
> $taxRate = "0.05";
> if ($OrderedByState=="MA" && $ShipState=="MA") {
> $taxcost=$taxRate*$totalPrice;
> } else if ($OrderedByState=="MA" && $ShipName != "" &&
> $ShipState!="MA")
{
> $taxcost= "0.00";
> } else if ($OrderedByState=="MA" && $ShipState=="") {
> $taxcost=$taxRate*$totalPrice;
> } else if ($ShipState=="MA") {
> $taxcost=$taxRate*$totalPrice;
> } else {
> $taxcost= "0.00";
> }
>
> return $taxcost;
> }
>
>
> Thanks for any help!
>
>