Send and Load data to/from PhP

Does anyone know of a good tutorial on how to load variables from a PhP script and then later send varibles to a PhP script to write to a file. A friend gave me a PhP script to work with but he programs in AS2, and all my stuff is in 3, so he couldnt help me with the actionscript.
I’ve done some searching and this is what I have so far:
//loading variables
var condition
function dataLoader() {
// Prepare request
var request:URLRequest=new URLRequest(“url”);
request.method=URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(request);
function completeHandler(evt:Event) {
var ip=evt.target.data.ip;
var experimentname=evt.target.data.experimentname;
condition=evt.target.data.condition;
var date_start=evt.target.data.date_start;
var time_start=evt.target.data.time_start;

storeData(“ip”,ip);
storeData(“experimentname”,experimentname);
storeData(“condition”,condition);
storeData(“date_start”,date_start);
storeData(“time_start”,time_start);
trace('IP = ’ + ip);
trace('Experiment Name = ’ + experimentname);
trace("Condition = "+condition);
trace("Start Date = "+date_start);
trace("Start Time = "+time_start);
intro_next.addEventListener(MouseEvent.CLICK, nextPageToInstructions);

}
}
dataLoader();

//to send variables
function sendData(url:String, _vars:URLVariables):void {
var request:URLRequest=new URLRequest(url);
var loader:URLLoader = new URLLoader();
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
request.data=_vars;
request.method=URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.load(request);
}
function handleComplete(event:Event):void {
var loader:URLLoader=URLLoader(event.target);
trace("Par: " + loader.data.par);
trace("Message: " + loader.data.msg);
}
function onIOError(event:IOErrorEvent):void {
trace(“Error loading URL.”);
}
sendData(parsefilename, dataString)

One problem may be that in his original use, he sends the data as an xml object. Here is the original data sending code (AS2):
getURL(parsefilename, “_self”);
}
datastring = datastring + “</VARIABLES>”;
var myXML:XML = new XML(datastring);
myXML.contentType = “text/xml”;
myXML.send(parsefilename, “_self”);

And the php data parsers load lines are this:
[SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$data[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SimpleXMLElement([/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$HTTP_RAW_POST_DATA[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//covert xml data into an associative array[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$experimentname[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$data[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]->experimentname;[/SIZE]

[SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$date_end[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]date[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2; [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//gets the current date[/COLOR][/SIZE][/COLOR][/SIZE]

[SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]$time_end[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]date[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2; [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//gets the current time[/COLOR][/SIZE]
[/COLOR][/SIZE]

Any help is greatly appreciated, even a simple link to good tutorial.