title: sending a variable to an email from as3 to php
body: <p>I'm working on a flash content on my website that contains an input box and a submit button.
  The user should put an answer of a question in the input box and when he clicks on submit, the answer should be sent to an email address.
  The problem is, when a user enters an answer, I receive an empty email message.
  Here are my codes:</p>
  
  <p><strong>Text box's code:</strong></p>
  
  <pre><code>var myData:URLVariables = new URLVariables();
  myData.answer = "";
  var myRequest:URLRequest = new URLRequest("MyDomain/..../example.php");
  myRequest.data = myData;
  myRequest.method = URLRequestMethod.POST;
  var loader:URLLoader = new URLLoader();
  loader.dataFormat = URLLoaderDataFormat.VARIABLES;
  </code></pre>
  
  <p><strong>The button's code:</strong></p>
  
  <pre><code>myButton.addEventListener(MouseEvent.CLICK, sen) ;
  function sen(Event:MouseEvent):void
  {
  navigateToURL( new URLRequest("MyDomain/..../example.php"), "_self");
  }
  </code></pre>
  
  <p><strong>and this is the PHP code:</strong></p>
  
  <pre><code>&lt;?php
  $answer = $_POST['answer']; 
  $to = "MyMail@example.com";
  $subject="Message from php";
  mail($to,$subject,$text,"Content-Type: text/plain; charset=utf-8");
  ?&gt;
  </code></pre>
  
  <p>So what's wrong with it?</p>