Skip to main content
Inspiring
March 26, 2012
Question

equations using php and / or javascript

  • March 26, 2012
  • 1 reply
  • 1950 views

i have a excel spreadsheet that has a basic - input one amount in column A then it adds column A to Column C to give Col D results. Well thats the rough idea.,

to basically a field comes from a mysql database then need to start the equation ( the field from the DB would be COL A)

what is the best way to do this?

This topic has been closed for replies.

1 reply

Participating Frequently
March 26, 2012

If the user is simply going to enter a single value and get the results, I would use php. If it's going to be more interactive - like they may try lots of different values, then javascript will provide a better user experience.

Inspiring
March 26, 2012

ok it is basically one amount coming from the DB and a fixed equation. What do i need to do to get going on this? are there any good tutorials out there?

Inspiring
March 26, 2012

Tutorial? Either I'm not understanding exactly what you need, or you are overthinking this problem. You already know;

1) How to create a form that lets a user pass a value to a script

2) How to retrieve the data from the database into a php variable

3) How to add or perform other mathematical operations on two variables in a php script

4) How to echo results to the screen

What part of this are you having difficulty with?


3) How to add or perform other mathematical operations on two variables in a php script is the part and maybe i am over complicating it. but the math side of it i dont know