Send JSON from Flash to PHP

Posted by vitto on Stack Overflow See other posts from Stack Overflow or by vitto
Published on 2010-06-04T17:27:59Z Indexed on 2010/06/05 23:32 UTC
Read the original article Hit count: 334

Filed under:
|
|

Hi, I'm trying to send array of data from Flash to PHP to sending e-mail. I'd like to do that because I must change the php page everytime my form site changes because of client's choice.

My answer is, can I send an array of objects like this to php?

var message:Array = new Array ();
message.push ({field_name:"Name", value:"John Lennon"});
message.push ({field_name:"e-mail", value:"[email protected]"});
message.push ({field_name:"Message", value:"Hello goodbye"});

so, PHP should recive a string like:

[
    {
        "field_name":"Name",
        "value":"John Lennon"
    },{
        "field_name":"e-mail",
        "value":"[email protected]"
    },{
        "field_name":"Message",
        "value":"Hello goodbye"
    }
]

does exist some tecnique?

© Stack Overflow or respective owner

Related posts about php

Related posts about JSON