Just to elaborate a little:
To send variables from flash to php you can use either
1)loadVariables (loadVariablesNum is a slight variation of this) or
2) LoadVars (which is a more object oriented approach, available in Flash MX)
loadVariables is the easiest to grasp, and will automatically send any variables that have been declared on the same timeline as it*, to the specified php script. The entire thing could look like this:
var myName = "Mortimer Jazz";
loadVariables("myphpscript.php",this,"POST");
If successful, the variable "myName" can now be accessed in php as $myName. Nothing more complicated than that.
//--------------------------------------------------------------
To send variables from php to flash you have to url-encode them. For example, if I had a textfield in flash with the variable name myTextBox and I wanted to display the contents of a php variable called 'bob' in that textbox I would be able to do this from php:
$bob="I've got a lovely bunch of coconuts";
print "&myTextBox=" . urlencode($bob);
note: Textboxes in flash MX are now objects, and you should really target the 'text' property of that object, rather than use the method described above, but technically there is nothing wrong with targetting the textbox's variable name, and will be the easiest option to get to grips with.
*the same timeline as the loadVariables function declaration