I am currently in the process of making an RPG. I have users sign up on a registration form and after signing up, it inserts information into the database including username and password. Now to log in, all it does is simply compare the username and password that the user has inputted to a username and password in the database and if they match, they successfully log in. Now, i have made a monster battling system where the user fights with their "stats" against imaginary monsters. Now the next step i want to do is to have it so that 2 users can fight against each other. I have the database information but how would i have it so that when various users login, they can fight each other in a 1:1 battle? For example, lets say Bob logged in, and on another computer, Joe logged in. They both have their own stats which are stored into the database corresponding to the info in the database. Now Joe and Bob want to battle. How would i do this? Any help would be appreciated.