I think you may be able to use the php split() or explode() on a array of data sent.
but probably easier to split it up when gathering the info in flash.
multiple small queries instead of a bulky single query?

Karl


On Sep 5, 2011, at 10:34 PM, Cor wrote:

Do you mean that is it not possible to send an array from Flash to PHP in
this way:

        private function validateAndSend(e:MouseEvent):void {
                form_variables = new URLVariables();
                form_varSend=new URLRequest(Main.PHP_URL+"control.php");
                form_varSend.method=URLRequestMethod.POST;
                form_varSend.data=form_variables;
                form_varLoader=new URLLoader  ;
                form_varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
                form_variables.sendRequest = "registreer_materiaal";
                form_variables.VALUES = myMultiDimArray;
                form_varLoader.addEventListener(Event.COMPLETE,
completeLoadHandler);                   
                form_varLoader.load(form_varSend);
        }


-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave Watts
Sent: dinsdag 6 september 2011 5:27
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

My problem is how to fetch my $_POST['VALUES'], which is the
multi-dimensional  array:

myArray[0["id"]
 myArray[0]["name"]
 myArray[0]["description"]

...

etc.

I'm not a PHP expert, but in general you can't really submit an array as form data directly to a CGI program. You have to post name-value pairs - if you have a set of array values, they'd simply end up having the same name and different values (like a checkbox array in HTML, for example). In your
case, things are a bit more complicated because you have an array of
structs, basically, so you'll need to convert those to a bunch of individual
name-value pairs in order to submit them to a CGI program.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule,
and provides the highest caliber vendor-authorized instruction at our
training centers, online, or onsite.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to