Hi Guys
I would like to have a form where i get an integer, double it, and add a second field, and then store the result.
I was thinking that if I create a hidden field with a value name, and then use this script:
<?php
$number1 = JRequest::getInt('uge', ', 'post');
$number2 = JRequest::getInt('dag', ', 'post');
echo ( $number * 2 ) + $number2 ;
?>
and then of course change the echo to assign the variable when it's working.
The form has 'uge' and 'dag' as field names, but when I submit, I get an error, did I do it wrong, is the example I found from a previous version of some sort?
I would like to have a form where i get an integer, double it, and add a second field, and then store the result.
I was thinking that if I create a hidden field with a value name, and then use this script:
<?php
$number1 = JRequest::getInt('uge', ', 'post');
$number2 = JRequest::getInt('dag', ', 'post');
echo ( $number * 2 ) + $number2 ;
?>
and then of course change the echo to assign the variable when it's working.
The form has 'uge' and 'dag' as field names, but when I submit, I get an error, did I do it wrong, is the example I found from a previous version of some sort?