calculation subtraction of amount for remaining balance in php
-
Problems encountered) :
I have an order form on which a credit number is deducted according to the following options:
speed limit = 1 credit
immobilizer = 2 credits
Stop / Start = 2 credits
NoX = 2 credits
DTC = 1 credit
Initially the cost of the order is 5 credits, and I currently have 18 credits, when I chose for example the first option to 1 credit, the result of the calculation is displayed well, ie the cost of the order goes to 6 credits, but the subtraction on the 18 credits currently on sale is not done, normally it should also show a balance of 12 credits instead of 18 since I make an order that costs 6 credits in total .Here is the linked code:
<?php endwhile; ?>
Total of order: <span class= “total”><?php echo $car->custom[‘prix’]; ?></span> credits
<p>You have <span class= “solde”><?php echo get_the_author_meta( ‘credits’, $user->ID ) ?></span> credits</p>
<?php acf_enqueue_uploader(); ?>I need help for days I’m looking for I can not find a solution.
On the Net I found the following code, but not being a developer ??
<?php
$my_first_number= 3;
$my_seconde_number = 4;
$resultat = $my_first_number – $my_seconde_number;
echo $resultat; //poster 3-4 ie -1
?>Thanks
- This topic was modified 5 years, 9 months ago by .
- This topic was modified 5 years, 9 months ago by . Reason: Title de-capped. Don't yell
The page I need help with: [log in to see the link]
- The topic ‘calculation subtraction of amount for remaining balance in php’ is closed to new replies.