Yeah, it's a bit of a step process.
(1) Player registers. A data packet is sent to the server looking something like:
Which "reg" tells the server that it's a new player so the server will create a new txt file for that player named "name$password" and writes all beginner stats inside that txt file. Then the server sends a confirmation that the player has been created or there was an error.
(2) Player logs in. A data packet is sent to the server with this:
The server looks for that txt file called "name$password" and sticks it on a Player's Online list. It then sends the player position and such to the client.
(3) Player moves around and the client sends movement and such to the server and it processes it and sends stuff back.
Though... if php is involved I don't know if there would be a processing server, then the client would have to fill those shoes...
I'll look into this. I'm enabling php on my mac at the moment.
Edit: I have enabled both php and mysql. Now I'll look into having a php site save stuff to the mysql database.
Second Edit: Check out this JavaScript/Php online mmorpg. It runs smooth, fast and looks pretty decent:
http://engine.nowhere-else.org/demo/-Gandolf