Hi everyone:

I am in the midst of creating an application that allows participants of
online games to register for and pay for games that they select. I have
decided to go about this by using a database instead of session variables to
maintain state. (The reason being not all gamers will have cookies enabled
as well I am not all that familiar with them as of yet). I just realized
that I do not know how to handle the situation that might arise if a
participant leaves the application without actually paying for the games
that they selected. If that situation was to arise what should happen is
that the games that they selected are "freed up". By freed up I mean that
the selection of those games does not affect the count of how many players
have actually registered (and paid) for their games.

Another situation that I am not sure how to handle is when the processing
leaves the site and hits PayPal (we have decided to go them to handle credit
card transactions).

Right now I have a table called gameRegistrations. It has three fields:

1) gameRegId - an autonumber , the primary key used to identify the
particular registration
2) playerId - a number that uniquely identifies the player who is
registering for a game
3) gameId - a number that identifies the game that is being registered for

I was hoping to use this table both for the cart (used to store a player's
selections, can be deleted from if player changes his mind about selection)
and to store the actual registrations that way it can be queried to see if
the maximum number of entrants for a particular game has been reached.

It seems to me to that I may need another field to link together the games
that are being registered for. I have to create a url that most likely will
contain the playerid , cost of game(s) being registered and a value that can
uniquely identify this proceess (the leaving of my site and subsequent hit
at PayPal).

If someone can provide me with some direction as to handle these situations
I would greatly appreciate it. I do not think that I am too far off now.

Thanks in advance
Terry