I am trying to write a simple html form and PHP form-handler. Before the user submits the form, some simple on-the-fly calculations are needed.
For example, if he or she requests 2 of item 1 @ £1.50 the total cost of £3.00 is displayed on the screen and so on down a list of 6 items, after which a total cost is displayed. The user then fills out his or her contact details and submits the form.
Can I use PHP to do the on-the-fly calculations, or do I need to use client-side scripting such as Java?