I use WebORB (http://www.themidnightcoders.com/weborb/php/) to connect
my Flex and PHP code.
Whenever I need to send data to the server I package up value objects
in an array and then send them to my PHP script. My PHP script loops
through the array and updates the database as required.
My advice to you is to download WebORB and get it working; Then check
out a few of the examples ("Sending and receiving an object" helped me
the most). Once you have that, just modify the example code to see it
working.
One of the best learning techniques (For me, at least) was to set up a
function in PHP that receives the array of objects; Create a local
file and then do a print_r into the local file. Then you can see the
layout of the array that you receive.
Sorry, but my code is very specific to what I do and would be no help
whatsoever. The WebORB Getting Started page
(http://www.themidnightcoders.com/weborb/php/gettingStarted.shtm)
should get you up and running fairly quickly though.
--- In [email protected], "ghus32" <[EMAIL PROTECTED]> wrote:
>
> Thanks Valdhor for your response :)
>
> that will indeed work. In fact I am already doing the part with the
> array collection but the part I am struggling with is sending the
> data to the PHP as separate values would the looping do this? I am
> new at this and was wondering if you have some sameple code or a
> website with an example..
>
> Thanks again
>
>
>
>
> --- In [email protected], "valdhor" <stevedepp@> wrote:
> >
> > It seems to me that the best idea is to use an arraycollection as
> the
> > dataprovider for your datagrid. When your app receives the random
> > number back it updates the arraycollection which, in turn, updates
> the
> > datagrid. Now, when you need to send your email, just loop through
> the
> > arraycollection (Check out IViewCursor for an alternative) and grab
> > the data you want.
> >
> >
> > --- In [email protected], "ghus32" <stevenpo@> wrote:
> > >
> > > I have an email part in my application where I am creating an
> > > attachment funtion.
> > >
> > > I have flex uploading the file using php and in the php the php
> > > renames the file to a random number. that random number is then
> > > passed back to a flex datagrid. So if a person uploads 2 files
> then
> > > the datagrid has 2 rows.
> > >
> > > When I send the email I need the values of those two rows so I
> can
> > > tell the php which files to send with the email.
> > >
> > > So I need to have the values of each row so I can pass them to
> the
> > > php.
> >
>