hi
i’ve been puzzling over this for a while now - hope you guys can help
i’m trying to send a bit of xml to a php script which adds the item to a basket (using a PHPSESSID) and returns a list of the basket contents back to the movie which i hand off to another function to deal with but i just can’t get a result from the sendAndLoad
my code is
// Send added item to php script and update
var XMLDoc:XML = new XML("<cartObject mode='add' designer='"+currentSelection.pdesigner+"' pName='"+currentSelection.pname+"' variation='"+currentSelection.vid+"|"+currentSelection.variation+"|"+currentSelection.vstock+"' size='"+currentSelection.psize+"' quantity='"+currentSelection.pquantity+"' />");
XMLDoc.contentType = "text/xml";
var XMLDocUrl:String = "basketAddPOST.php?PHPSESSID="+PHPSESSID;
// new xml variable to receive xml response from server side php script
var resultXML:XML = new XML();
resultXML.ignoreWhite = true;
resultXML.onLoad = handleXML;
function handleXML(success:Boolean):Void {
if (success) {
trace ("success"); //<-- not having much of this
populatePurchaseArray(thisXML);
}
}
//send and load to resultXML
XMLDoc.sendAndLoad(XMLDocUrl, resultXML, "POST");
i was requesting a summary from another php file but that was updating too slowly so would only give me the summary from the previous action - however, it did show me that the xml is getting to the basket and updating it but the basket is not returning, or even failing to return, the xml list.
is this a problem with my actionscript or should i be looking at the php?
hope you can help
obie