Q:

Flex Post to php page

I am trying to post some data from my flex app to a PHP script to be saved.
As a simple test i have made the php script like so
<?php
if ($_POST) {

    $message = "Text:" . $_POST['Text'];

    mail('vince@myemailaddress.com', 'POSTED!', $message);

} else {
    mail('vince@myemailaddress.com', 'No Post Test', 'Testing..');
}

?>

If i hit the script in the browser i receive an email fine. But when i call my flex function i get nothing?
Am i doing it wrong?
private function onTextMessageRecv(event:AsyncDataEvent):void
{
  var dialogID:String = event.data;
  var strFrom:String = event.data2;
  var strTime:String = event.data3;
  var MessageStr:String = event.data4;

  var variables:URLVariables = new URLVariables()
  variables.From = strFrom;
  variables.To = m_strUserDisplayName;
  variables.Text = MessageStr;
  saveIMdata( variables);

}

private function saveIMdata( variables:URLVariables):void 
{
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, "Saving IM...");
    var myData:URLRequest = new URLRequest("http://im.vlowe.co.uk/save.php")
    myData.method = URLRequestMethod.POST
    myData.data = variables
    var loader:URLLoader = new URLLoader()
    loader.dataFormat = URLLoaderDataFormat.VARIABLES
    loader.load(myData)
}

I do see the Log entry for "Saving IM...", but no email?
Thanks for any help.
update:
Tried this.. but neither event seems to fire?
private function saveIMdata( variables:URLVariables):void 
{
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, "Saving IM...");
    var myData:URLRequest = new URLRequest("http://im.vlowe.co.uk/save.php");
    myData.method = URLRequestMethod.POST;
    myData.data = variables;
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, variables.Text);
    var loader:URLLoader = new URLLoader();

    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, "Loaded?...");
    loader.addEventListener(Event.COMPLETE, onLoadComplete);
    loader.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);

    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.load(myData);
}

private function onLoadComplete(e:Event):void
{
    var loader:URLLoader = URLLoader(e.target);
    trace(loader.data);
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, "Load completed");
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, loader.data.toString());
}

private function onLoadError(e:IOErrorEvent):void
{
    trace(e.text);
    LogAddItem( LOG_CATEGORY_MAIN_DEBUG, "Error " + e.text);
}

Update 2:
my crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" to-ports="80,843,8080,8081,8082" secure="false"/>
</cross-domain-policy>

A:

Sounds to me like a cross domain security issue.
    loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    private function securityErrorHandler(event:SecurityErrorEvent):void {
       trace("securityErrorHandler: " + event);
    }

[EDIT]
This doesn't exist http://im.vlowe.co.uk/crossdomain.xml
Your crossdomain.xml should look like this. Drop the doctype
<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy>
    <allow-access-from domain="*.someDomain.com"/>
</cross-domain-policy>

