Jump to content

sunziun

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by sunziun

  1. I dont get 3.9 for $sb.I get 1.33.9 thats the problem I have.
  2. Hello Everyone, what could be the solution for this problem? $sa=0.15; $sb=1.30; echo $sa * 3;echo $sb * 3; result for $sa I get correct calculation of 0.45 but for $sb instead of 3.9 I get wrong calculation of 1.33.9. what can I do to fix this issue?
  3. sunziun

    PHP Min Max

    I got it now and this works like a charm if($start > 0.00 && $start < 1.00) $fee=0.09; elseif($start > 0.99 && $start < 5.00) $fee=0.13; else echo $fee=1.34; @ So Called the zero problem will be controlled by a minimum form validation of 0.01.
  4. sunziun

    PHP Min Max

    Hello, unfortunately none is working. I have a form which the user enters his amount. Based on that the result.php page should calculate and display the fees applicable. I was playing with range() but I cant find out how to implement the $amount variable. if(range($amount, 0.99, $step) ) echo $fee=0.00;elseif(range($amount,4.99,$step)) echo $fee=0.09; it displays only a 0 (zero) even when i put in amount of 4.50
  5. sunziun

    PHP Min Max

    I dont get any error message, I just dont know to do this simple calculation via php!?
  6. sunziun

    PHP Min Max

    Hello Everyone, right now I am trying to do an small app that can calculate fees based on the price a user has given. Example: $0.01 - $0.99 = $0.09$1 - $5.99 = $0.13$99 or more = $1.34 So far I have this code but I cannot get it to work properly: if($start < 1.00){ echo "<p>" . $ins_fees[0] . $sym . $ins_fees[1] . "</p>"; // FURTHER CALCULATION } if($start == 1.00){ echo "<p>" . $ins_fees[0] . $sym . $ins_fees[2] . "</p>"; // FURTHER CALCULATION } else{ if($start > 1){ echo "<p>" . $ins_fees[0] . $sym . $ins_fees[2] . "</p>"; // FURTHER CALCULATION } } thanks for everyone!
  7. How can I do that?

×
×
  • Create New...