I am completing a script which will calculate totals for ebay auctions and enter the orders into a mySQL database. The values from a form for $x_ship_to_state and $qty1 are successfully passed to the page I am working on, but when I run
if ($x_ship_to_state = CA ) {
$tax = ($qty1 $price .075);
} else {
$tax = (0.00);
}
if ($qty1 = '1') {
$x_freight = ($shipcostfirst);
} elseif ($qty1 > '1') {
$additionalitems = ($qty1 - '1');
$additionalshipping = ($additionalitems * $shipcostaddit);
$x_freight = ($shipcostfirst + $additionalshipping);
}
$x_amount = ($subtotal + $x_freight + $tax);
it changes the state to CA and the quantity to 1. If I echo the values before running the if statements they are the correct passed values. I am relatively new to PHP so I am guessing it is a simple syntax error.
Thanks in advance,
Brandon