I have a page that uses javascript for computing inventories.
I use PHP as my server-side language for saving to MySQL.
What is the proper practice when it comes to this situation:
Use only php to compute then save to DB.
Use only javascript to compute then use PHP to save to DB.
Or should I use both to compute? Please help. Thanks