Put your show dates and available tickets in a database.
When the user selects a particular date, query the database to get total amount of tickets available.
When the user enters how many tickets they want, verify that the number of tickets the user wants is not greater than the total amount of tickets available.
Once the user purchases the tickets update the database by subtracting the number of purchased tickets from the total number of tickets available.