Jump to content

medprogress

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by medprogress

  1. Thats exactly it KrisNz, I don't have a reference and I would like help with that. teng84, essentially yes, I want them to put in a number they desire. And on the PHP script, I want the number they put in to be the multiplier.
  2. Close, but not the multiplication part. I don't want (a+b+c) be to multiply by 1000, i want the (a+b+c) be multiplied by the number a customer inputs into the form. So if a customer puts in "500", that is the number i want (a+b+c) be multiplied by.
  3. Thanks for the reply Ive added () and it does not affect the result. Just to expand on my question -- I want the number that is put into form field "Number of Mail Pieces" to be multiplied by [ ( $package_price + $maintenance_price + $addon1_price + $addon2_price + $addon3_price + $addon4_price ) ]. Hope that clarifies it a bit more.
  4. Hi, We have a script that does simple mathematical calculations (addition) which we use to provide our clients with an instant quote for my services. I am trying to expand that script to do an additional task -- (A+B+C) x D . Our current script only does (A+B+C). I can't get it to work, here is how it looks: Link to the page: http://medprogress.net/mail/mail_customize.php (note: website is still under heavy constructions) The form aspect in question is where customers input "Number of Mail pieces" and I would like that to be the "D" in my (A+B+C) x D equation. PHP calculations script: // TURN ON ERROR PRINTING IF NEEDED ini_set ('display_errors', 1); error_reporting (E_ALL); // SET VARIABLES FOR QUOTE NUMBER GENERATION $time = time(); $qn = rand(1, 99); $quote_num = $time . ' ' . $qn; // CALCULATE PACKAGE PRICE AND SELECTION If ( !empty($package) ) { switch ($package) { case "Internal": $package_price = 0; break; case "External": $package_price = 0; break; } } Else { $package = ""; $package_price = 0; } // CALCULATE ADD-ONS If ( !empty($addon1) ) { $addon1_price = 0.14; } Else { $addon1_price = 0; $addon1 = ""; } If ( !empty($addon2) ) { $addon2_price = 0.10; } Else { $addon2_price = 0; $addon2 = ""; } If ( !empty($addon3) ) { $addon3_price = 0.13; } Else { $addon3_price = 0; $addon3 = ""; } If ( !empty($addon4) ) { $addon4_price = .30; } Else { $addon4_price = 0; $addon4 = ""; } // CALCULATE MAINTENANCE COSTS If ( !empty($maintenance) ) { switch ($maintenance) { case "Postcard": $maintenance_price = 1.00; break; case "Newsletter": $maintenance_price = 1.10; break; } } Else { $maintenance = ""; $maintenance_price = 0; } $amount = $package_price + $maintenance_price + $addon1_price + $addon2_price + $addon3_price + $addon4_price * 10000; (This is were i'm stuck) $total = $package_price + $maintenance_price + $addon1_price + $addon2_price + $addon3_price + $addon4_price; If ($total > 0) { $select = "yes"; } Else { $select = "no"; } $downpayment = $total / 2; $total = number_format ($total, 2); $downpayment = number_format ($downpayment, 2); $eitems = ""; $items = "";
×
×
  • 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.