HELP! Code for Calculation Available Tickets

Hello everyone!


In the picture above, there are two sections:

  • 3 bars for user input (select date, select number, submit), connected to a database.
  • 2 text zones (show dates, available tickets), each with 6 text fields.

I would like to achieve the following: each time a user submits the form, the number of available tickets for the selected date has to decrease with the number of ordered tickets for that date.

Example: I want 2 tickets for the show on Friday 20 September 2019. When I submit the form, the number under available tickets for that specific date should go from 86 to 84 (when the page has reloaded).

I’ve been trying so many things already, but it seems to me that I’ll need some more advanced coding for this. Can someone please help me with this?

Thanks a lot in advance!