I would like to test a field 'member', if this it true I need to calculate 'total'= 'A' *3 + 'B' * 5.
The fields A, B are fields of the form and it should fill in the field 'total' on the form.
How does the form know its a form field? What syntax do I need to show the result. I found this, but this uses echo to show the result:
The fields A, B are fields of the form and it should fill in the field 'total' on the form.
How does the form know its a form field? What syntax do I need to show the result. I found this, but this uses echo to show the result:
<?php
function isEven($nr) {
return ($nr % 2) ? true : false;
}
// Voorbeeld
$getal = 123;
if(isEven($getal)) {
echo '<br />' . $getal . ' is even!';
// doe iets
}
else {
echo '<br />' . $getal . ' is oneven!';
// doe iets anders!
}
?>