gordonrp wrote:The user is buying a ticket on the OP's first page of code, so we don't care if they hack the input and POST false data. We are going have to validate the data submitted anyway to ensure that there wasn't someone else who purchased that ticket between the time that the first page (available) tickets was displayed and the time the user clicks "buy".
That is true, if we only validate the ticket after the final stage. We could validate it immediately after the stage where it is selected, and thus after the final stage only need to check that it is still available instead of performing a full validation.
There is actually another possibility, which perhaps involves greater use of the database: immediately after selection, the ticket is reserved until the termination of the process or a timeout. Subsequent users would not be able to select the ticket, even if the first user has not completed the process. This reduces the chance of a user being frustrated by reducing the window of time between ticket selection and confirmation, while allowing for intermediate stages.
With this method, the ticket will certainly need to be fully validated immediately after selection, but would not need to be checked for availability at the end.
gordonrp wrote:The whole process of choosing a ticket requires that data be submitted in some fashion, and we can't really do that without a hidden field in this case.
Not really: a cookie, a session or even the database can be used. This is really all about maintaining state.