I’m sending an array of 20 items to a PHP script. Here’s the sendAndLoad call:
rankedSubmitBtn.onRelease = rankedSubmitBtn.onReleaseOutside = function():Void
{
trace(":: rankedSendVars Sent ::");
rankedSendVars.sendAndLoad("http://somewebsite.com/somefolder/somescript.php?rank_config_id=" + configID + "&rank_data=" + rankedData + "&nocache=" + new Date().getTime(), rankedRecVars, "POST");
}
The array data – rankedData – gets converted to a comma delimited string. The PHP script processes the send vars like so:
$submitID = $_POST["rank_config_id"];
$submitRawData = $_POST["rank_data"];
$submitData = explode(",", $submitRawData);
$submitDataLen = count($submitData);
The only way I can get the $_POST[“rank_data”] to work is if I process it as a REQUEST vs. a POST variable:
$submitID = $_POST["rank_config_id"];
$submitRawData = $_REQUEST["rank_data"];
$submitData = explode(",", $submitRawData);
$submitDataLen = count($submitData);
Why is that? Why is the $_POST[“rank_data”] undefined by the PHP? I know the SWF is sending it. If anyone can chime in on this, I’d appreciate it, as I want to make sure that I’m setting up this PHP and Actionscript sendAndLoad properly.
Thanks,
IronChefMorimoto