By Aaron Lefler
I know what I want to do but don’t know how to put the pieces together.
start mileage km | end mileage km | total km | convert mi | rate | total
5555 I 6666 | 1111 | 690.34 | $0.49 | $338.27
Would you do calculations with JavaScript before reaching the backend.or do the calculators with php at server level and store it. It some other language. Essentially I want to perform spreadsheet calculations and make an app that is easier to use reliable. I’m building this for myself and the old bitter bastards I work with.
Do you know why there are no bright eyed smiling truck drivers? because they haven’t given up on there dreams yet. I
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
I would recommend doing the calculation with PHP rather than JavaScript because with JavaScript the users could manipulate the logic in their browsers if they decided to.
PHP works extremely well with MySQL, so you could just have a function or a class that connects to the database, makes the calculation and then you could just display this on your front end with HTML/CSS/JS.
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.