I am wanting to find information on how I can construct a ticket reservation system with PHP and MySQL.
The tickets available will be for individual events that have limited places available.
The system must:
- Display the correct number of available tickets at any one time
- Temporarily allocate a ticket to a customer (for specified time period) while they enter their payment details
- Prevent other customers from buying a ticket that someone else is in the process of paying for
- Re-assign tickets to an events available ticket total if an allocated ticket transaction fails or the user abandons payment
The system will hopefully be based upon the Ticketmaster approach. This allocates a customer a ticket and gives them x amount of time to purchase the ticket. During this time the ticket is unavailable for purchase by other customers. If the transaction fails or time runs out the ticket is de-allocated and can be purchased by another customer.
My simple question then is how can such a system be implemented? How do you think Ticketmaster have implemented such a system?
Im looking for a nudge in the right direction and any help appreciated.