Groups | Blog | Home
all groups > flash data integration > april 2005 >

flash data integration : xmlconector.trigger() how to read the params in php?


jose cardona
4/28/2005 10:41:23 AM
i send the params from a xmlConector to a php but i dont know how to get
that data in php
with the name of the component?, $_POST["params"]? i dont know what to do
andersonsidney
5/2/2005 12:00:00 AM

Take a look at the LoadVars Class in your help. Also the sendAndLoad method
is nice because you stay inside your SWF as oppose to opening a new browser
window (use the send method if you want a browser window to open.



In PHP you will need to pick up the variables from a post.

So in your PHP file you will need something like this:

$firstname=$_REQUEST['firstName'];
$middlename=$_REQUEST['middleName'];


In Flash you will write something like this in a Button Component to push the
variables.

// Send data to server Object
var sendVar:LoadVars = new LoadVars();
// Return info from server for error parsing Object
var returnVar:LoadVars = new LoadVars();
//All of my send data, note, varibles can be instantiated on the fly-go figure
sendVar.firstName=this._parent.txtFirstName.text;
sendVar.middleName=this._parent.txtMiddleName.text;
//Send to server
sendVar.sendAndLoad("http://127.0.0.1/putnames.php5",returnVar,"POST");
AddThis Social Bookmark Button