Unload data from MySql without refreshing the page?
Make a small browser game. Its essence in the following: user creates a room, he enters the number. Next to it is connected and the second player tries to guess this number, it is given 10 attempts.
Implemented like this:
1. When a room is created in MySql table is created in the line: No. game, date, player 1 (the room Creator), its number, the second player, the number of the second player, the result (0 - 2 player joined, 1 - victory 1, 2 - victory of the second).
2. When a room is created from filled 4 columns of the row.
3. Player 2 opens the room and clicks the join button and enters the number
4. In the database in the line of this game is saved a login of the player 2 and its number.
The problem is the following: to the player 1 saw player 2 has joined the room he needs to reload the page. How to make player 2 at the first appear without reloading the page?