Yeah, a socket server-type solution is ideal for multiplayer games. If you want to do it with php/mysql you can discover disconnects by having the polling Flash player touch a timestamp every X seconds and then count them as disconnected if they haven't checked in for X*3 seconds, or something along those lines. The design questions are up to you and your game, though