Date: 06/11/02
- Next message: James Kupernik: "[PHP-DB] Re: case"
- Previous message: Jay Blanchard: "[PHP-DB] RE: [PHP] dumping only selected records into another table"
- Next in thread: James Kupernik: "[PHP-DB] Re: case"
- Reply: James Kupernik: "[PHP-DB] Re: case"
- Maybe reply: Martin Clifford: "Re: [PHP-DB] case"
- Reply: Paul Burney: "Re: [PHP-DB] case"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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!
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: James Kupernik: "[PHP-DB] Re: case"
- Previous message: Jay Blanchard: "[PHP-DB] RE: [PHP] dumping only selected records into another table"
- Next in thread: James Kupernik: "[PHP-DB] Re: case"
- Reply: James Kupernik: "[PHP-DB] Re: case"
- Maybe reply: Martin Clifford: "Re: [PHP-DB] case"
- Reply: Paul Burney: "Re: [PHP-DB] case"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

