I made a event registration form.
There are some currency fields in it.
Those fields are varchar in the table
This is the code to calculate.
When I put values like 10,00 + 5,00 + 2,50 in it the result is 17 and not 17,50.
What i'm I doing wrong
There are some currency fields in it.
Those fields are varchar in the table
<?php
$form->data['total'] = $form->data['startgeld_eerste_inschrijving'] + $form->data['aantal_extra_maaltijden'] +$form->data['tweede_inschrijving'] + $form->data['aantal_kinderrennen'];
?>
This is the code to calculate.
When I put values like 10,00 + 5,00 + 2,50 in it the result is 17 and not 17,50.
What i'm I doing wrong
Hi rbergen,
Please see this StackOverFlow answer, I think that the commas are probably the problem here.
Bob
Please see this StackOverFlow answer, I think that the commas are probably the problem here.
Bob
This topic is locked and no more replies can be posted.