Still confused. What I am trying to do is to save the value that is returned from the functions below...
function calculate_shipping($total_weight,$ship_method,$total_price)
{
if ($total_price >= 1000.00) { return 0.00; }
else
if ($total_weight <= "10" and $ship_method == "UPS_Ground") { return 7.00; }
if ($total_weight <= "10" and $ship_method == "UPS_Overnight") { return 14.00; }
if ($total_weight >= "10" and $ship_method == "UPS_Ground") { return 30.00; }
if ($total_weight >= "10" and $ship_method == "UPS_Overnight") { return 60.00; }
}
____________and_______________
function calculate_tax($total_price,$state)
{
if ($state == PA || $state == Pa || $state == pa || $state == pA)
return $total_price*0.06;
}
.... to be used in another function to calculate the total purchase price. ie: ($shipping+$tax+$total_price) Right now, since $total_price is already registered in a session, the value is carried into the totalling function. The $tax and $shipping just disappear. Not sure how to incorporate the $foo/$bar code as suggested,