I'm trying to update shipping costs based off of which radio button the user checks. I am not doing this inside of a form element so $_POST['shipping'] isn't working. Here's my code:
PHP:
    if(isset($_POST['shipping']) === "free") {
        $_SESSION['shipping_charges'] = 0;
        $ShippingCharges = 0;
        $grand = $cart->total() + 0;
    } else if(isset($_POST['shipping']) == "overnight") {
        $_SESSION['shipping_charges'] = USPSPriorityExpress($cart->total_items(), 90210);
        $ShippingCharges = USPSPriorityExpress($cart->total_items(), 90210);
        $grand = $cart->total() + USPSPriorityExpress($cart->total_items(), 90210);
    } else if(isset($_POST['shipping']) == "overnight") {
        $_SESSION['shipping_charges'] = USPSPriority($cart->total_items(), 90210);
        $ShippingCharges = USPSPriority($cart->total_items(), 90210);
        $grand = $cart->total() + USPSPriority($cart->total_items(), 90210);
    };
HTML:
  <tr>
    <td>
      <input type="radio" id="free" name="shipping" value="free" class="shippingHover" checked="checked" />
    </td>
    <td colspan="2">
      <label for="free" class="shippingHover">$0 Free shipping (2-8 business days)</label>
    </td>
  </tr>
  <tr>
    <td class="shippingHover">
      <input type="radio" id="overnight" name="shipping" class="shippingHover" value="overnight" />
    </td>
    <td colspan="2">
      <label for="overnight" class="shippingHover">
      <?php echo '$' . USPSPriorityExpress($cart->total_items(), 90210); ?>  USPS Overnight:</label>
    </td>
  </tr>
  <tr>
    <td class="shippingHover">
    <input type="radio" id="3day" name="shipping" class="shippingHover" value="3day" />
    </td>
    <td colspan="2">
      <label for="3day" class="shippingHover">
      <?php echo '$' . USPSPriority($cart->total_items(), 90210); ?>  USPS Priority 1-3 business days:
      </label>
    </td>
  </tr>
If you'd like to see what this looks like, go to http://www.chicmaternity.dfwcraftbeer.com/viewCart.php to view the page.
 
    