Jump to content

Calculation


Canman2005

Recommended Posts

Hi all

 

Wondering if someone can help me.

 

Basically I have a form which has 2 fields

 

Numbers (which on the form is called `number`)

Real Number (which on the form is called `real_number`)

 

I then have a price (which on the form is called `cost`)

 

What I want to do is if in the number field there is the value 100 and the price value is 5 and someone enters into the real number the value 200, then it would calculate the price at 10

 

Again, if the number value was 1 and the price was 15 and the real number value was changed to 2 then the price would increase to 30

 

If for example the number value was 50 and the price was 10 and the real value number was changed to 25 then the price would come out at 5

 

Does that make sense?

 

Can anyone help?

Link to comment
https://forums.phpfreaks.com/topic/134476-calculation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.