RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Hi Karl, The Flash part is no problem. But in PHP I am a novice! So far I learned that I should think of sending Strings to PHP instead of a complete multi-dim array. I don't know how to set up PHP to open it once. Do all your sending and inserting, then close once I am done? Do you have some exa

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
Correction... _parent.status = this.status; } }; mylv.sendAndLoad("http://yourwebsite.com/process.php";, myreply, "POST"); _parent.status = "sending now ..."; //end while loop here } Best, Karl On Sep 5, 2011, at 11:20 PM, Karl DeSaulniers wro

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
Hi Cor, On Sep 5, 2011, at 11:14 PM, Cor wrote: Karl, Thank you very much!! But this would create a lot of network traffic, open connection and database, do mysql_query and close db conn?? You only need to open it once. Do all your sending and inserting, then close once your done. You

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
Hey Cor, This is how I have it set up in as2, you may be able to port easier than I. send_btn.onRelease = function() { //Creates a LoadVars and get values from the form mylv = new LoadVars(); myreply = new LoadVars(); mylv.formTrue = "1"; //Verify were on our fo

RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Thanks David, OK, HTTP -> String... that clears a lot! Can you give a little example of how to do you typically have to serialize your data to send via HTTP, then deserialize the sent data to use it as an object that's not a string. Best regards, Cor van Dooren -Original Message- From:

RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Karl, Thank you very much!! But this would create a lot of network traffic, open connection and database, do mysql_query and close db conn?? You wrote in the previous mail: I should mention that I use this stuff inside php classes. so $this-> has already been defined as the class your currently

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Dave Watts
> 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_variables.VALUES = myMultiDimArray; >            

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
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 t

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
Hi Cor, Have you ever made a mail form in flash? I am assuming you have. Pretty much same scenario. Just break down myArray[i] into individual vars and send the variables to the php file. So with a while or for loop, gather all your variables and send away. Opt 1. for each set - myArray[0]

RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
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_varSe

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Dave Watts
> 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

RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Thanks Karl, Yes, I know. My problem is how to fetch my $_POST['VALUES'], which is the multi-dimensional array: myArray[0["id"] myArray[0]["name"] myArray[0]["description"] myArray[1["id"] myArray[1]["name"] myArray[1]["description"] myArray[2["id"] myArray[2]["name"] myArray[2]["descrip

Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Karl DeSaulniers
Hi Cor, Assuming you know enough php to set up the file for connecting to your database, you can insert into your database with the following example. function addDescription($id, $name, $description) { //Escape any data being inserted $id = mysql_real_escape_string($id);

[Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
I have a editable datagrid which I fill from mySQL with PHP. So far works good. But when items are changed (edit, added, deleted), I want them to save the data in my mySQL database. My values are in this multi-dimensional indexed array, which elements all contain a associative array: myArray[i]["

Re: [Flashcoders] DataGrid: Expanding vertical Thumb width

2011-09-05 Thread Glen Pike
Hi, I remember having to hack this in Flash for a list component, you should be able to set the style, but you need to use GrantSkinners workaround http://gskinner.com/blog/archives/2007/05/variable_scroll.html Edit your skin, then include Grant's fl.controls.List or whatever - that