| textfield1+textfield2
|
skoff

msg:4240708 | 8:49 pm on Dec 9, 2010 (gmt 0) | is there a way to make an addition with two text field with the values that they have in them. Example if my textfield1 contain 1 and the textfield2 contain 3 i would like to have the result 4 in a textfield3.
|
Anyango

msg:4240911 | 10:09 am on Dec 10, 2010 (gmt 0) | <?php $result=floatval($_REQUEST["textfield1"])+floatval($_REQUEST["textfield2"]); ?> <input type="text" name="textfield3" id="textfield3" value="<?php =$result;?>">
|
Matthew1980

msg:4241117 | 5:41 pm on Dec 10, 2010 (gmt 0) | Hi all, Unless I misunderstand the context of this, I would urge you to substitute the _REQUEST for _POST, this is purely for a more secure approach, but if this is just for development, you should be fine, but honestly try not to use _REQUEST on a live server as you will reveal lots of information about your site. Cheers, MRb
|
Anyango

msg:4241530 | 12:25 pm on Dec 12, 2010 (gmt 0) | Yep makes sense, just that i didnt know what his form submission method was and i didnt want to post something that won't work for him when he tries
|
|
|