OK. It's pretty simple.
To start with you need a Flash-native object to set up the data you will want to send.
ActionScript Code:
var userArray:Array = new Array; // you need an array in this case
userArray[0] ={first_name:"john", family_name:"smith",age:25}; // you need correct object syntax using {} curly braces
userArray[1] ={first_name:"jane", family_name:"brown",age:27};
Then you need to set up 2 objects. One to send your variables to the server, and one to receive the response.
1 - an object to receive whatever your server responds with (probably an XML string "<xml><result>All OK</result></xml>")
ActionScript Code:
// Results will be XML, so we set up an XML object
var results:XML = new XML()
2 - The LoadVars class that does the sending and then loading
ActionScript Code:
var lv: LoadVars = new LoadVars(); // set up the class
The onload handler will do something useful when the send and load has completed (as in Flash has received a response from the server, such as echo "<xml>.... ... </xml>").
ActionScript Code:
lv.onLoad=function(success) {
if (success) trace(results); // remember this is an XML object we set up a minute ago
else trace("error");
}
Now you want to send the data.
ActionScript Code:
lv.sendAndLoad("add-users.php", results, "POST");
// Send the data to "add-users.php"
// load the response into results
// do the send using the POST method
It should just do it's thing, assuming that security is all sorted.
Is that clear?