Jump to content

magicmark

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

magicmark's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please Please Please help me make this script display a real number as the result without using normal + & - PHP e.g. $Total + $Shipping? //Variables $Coupon = '22002'; $Total = 149; $Shipping = 12.50; //20% Discount Calculation $Discount = bcmul($Total, '0.2'); $Discounted = bcsub($Total, $Discount); //If Statement for Criteria, Compulsory Inputs or Handling if (empty($Coupon)) { $TotalWithShipping = bcadd($Total, $Shipping); } elseif ( $Coupon == '22001' || $Coupon == '22002' ){ $TotalWithShipping = bcadd($Discounted, $Shipping); } else { echo "Invalid Coupon Code!"; } //Display Result echo $TotalWithShipping;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.