Connecting to php or mysql or xml

Is there any way to connect javascript to php, mysql or xml?

I want to create a game where you compete with your friend online. All I have to do is to make a code that connects to php, mysql or xml and updates x and y position of the game object every, let’s say, 0,25 or 0,1 sec.

Can you please give me the code?

PHP and XML are files that will be on some server and they will only use for passing variables from and to 2 players that will play that game.
If you know those games, are Combat Arms and NFS World made like that?

Thank you.

try this: http://forum.unity3d.com/threads/61528-My-Login-System