Jump to content

Derold

New Members
  • Posts

    4
  • Joined

  • Last visited

Derold's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all. HELP!! I am trying to make a php calculator with check boxes. Lets say I have four check boxes with preset amounts. and one edit box that is times the total of the check boxes. Here is a link to a sample that I have been working on. http://derolds.com/calc/page3.php. Take a look at the code below the calculator. The text in the blue is the part I am having trouble with
  2. OK I got this. Here is the new updated version at http://derolds.com/calc18.php . Take a look. Copy it. use it. change it.
  3. Ok i got it now. I changed the line to this. Needed to get total of the first two first then add the second two. $sum = (floatval($_POST["indexEditbox1"]) + floatval($_POST["indexEditbox2"])) * 1.01+ floatval($_POST["calc15Editbox3"]) + floatval($_POST["calc15Editbox4"]);
  4. Help!!!!!! i am making a form that calculates this is the line that i am having problems with. It works but when i add *.01+ the calculation is wrong. you can see the test page at derolds.com/calc15.php <?php if (count($_POST) > 0 && isset($_POST["calc15TextArea2"])){ $sum = floatval( $_POST["indexEditbox1"] ) + floatval( $_POST["indexEditbox2"] ) *.01+ floatval( $_POST["calc15Editbox3"] ) + floatval( $_POST["calc15Editbox4"] ) ; echo "Total is $ $sum"; } ?>
×
×
  • 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.