PDA

View Full Version : PHP calculating percents?


John1704
03-31-2007, 03:45 AM
Hi everybody,

I'm trying to create a tip calculator and I'm wondering how to calculate a percent.

Of course, there are two fields when it will be submitted, "bill" and "tip" percentage:

And this is what I think would add it together:



First of all, I am coding that right? If so, then how can I calculate a percentage using PHP?
If not, what should I do to correct it?

Thanks in advance.