PDA

View Full Version : How to sum 2 or 3 fields with Numbers?


Mikedata
09-25-2006, 08:48 PM
Is it possible to add the value of 2 0r 3 fields with numbers into one
lest say field 1 24.00
field 2 30.00

Have a field sum totaling the amount field total = 54.00

Please advise, Thanks Mike.

My evaluation time is running out and I would like to know if this is possibly so I can upgrade.

cica
09-25-2006, 10:25 PM
Mike-

I'm not sure what you're asking. If you're referring to mysql fields, it is never a good idea to store calculated results in a third field. You're much better off just pulling both fields and displaying the result.

If you're referring to the boxes in the page editor, you can't simply type a number into the text editor of each box and ask the program to retrieve this and display a result.

The short answer is that once you start using mysql and php, you can do pretty much anything. If you can be more specific, I'm sure we can come up with a custom script that will do what you want.

-Tom

Mikedata
09-25-2006, 10:54 PM
I only need to show the user that when he enters varios numbers in a few fields, he sees a total of all the fieldsin the screen.

Is this process complicated? is there any books or manual that yuo recomend to use to manupilate the htm or php pages to do more that the present Soholaunch Offers.
I will need the upgrade no matter what. I just want o see if the basic funtions can be realized.

You are working now in 2 of them.
I will appreciate this help a lot. Mike

cica
09-25-2006, 11:39 PM
Mike-

I think I'm getting it now. You have several text boxes and you want the values to total at the bottom? You need to build a form and add a "calculate" button. The form needs to call itself and then it can redraw all the fields as well as the calculated field. It's pretty easy once you've done it a few times.:ehheh: Your best bet is to post the code for your page and let us see what you have so far. When you do post, be sure to enclose the code with code tags. Hit the "#" in the toolbar on the top of the editor. (not the one on your keyboard).:geek:

-Tom