Actually is a very easy thing to do. You should only have a PHP file that has its output as an XML. To do that you will need to send a clue, like an id or something, to create the XML file only with the information you need. We'll see how to do that later, first lets see the PHP file itself.
<?php
extract ($_GET);
mysql_connect('host' , 'user' , 'password');
mysql_select_db('database');
$dbTable=mysql_query("SELECT * FROM table WHERE id= '$theClue");
echo '<?xml version="1.0" encoding="utf-8"?>
<group>
';
while ($dbRow = mysql_fetch_array($dbTable))
{
extract ($dbRow);
echo "
<team teamN=\"$team_Number\">
<name>$team_Name</name>
</team>\n\n
";
}
echo '
</group>';
I hope this lines to be understandable. Now, to call this file at the same time that we send 'theClue' lets see this AS3 lines, supposing our PHP file is Xml.php and 'theClue' is an existing var called 'User_id'
var dbXML:XML;
var loaderOfXML:URLLoader = new URLLoader();
loaderOfXML.load(new URLRequest('Xml.php?theClue='+id));
loaderOfXML.addEventListener(Event.COMPLETE, processXML);//this last funtcion would be to process the XML, so its up to you its content
As you can see, the PHP file receives the User_id and then looks on the database for the entries that match the User_id, suppouse then that on this example it will show only the info related to that user.