MicroSun
04-24-2006, 09:53 PM
Hello,
I create a flash form which contains TextInput components. The number, position, name, label of these compnents are defined in an XML file. With actionscript I process the XML and create new components and put them in an array.
Everything works fine except that I can't find a good way to send user inputs to a php script. If I collect the values in an array and pass it to loadvars than it converts the array to a comma separated string. But what if the user enters a comma in the textfield. I want to allow this but in this case I can't rebuild the array in PHP. See my submit code below.
How can I solve this problem?
Thanks!
function submit() {
var tt = new Array();
tt[0] = testBoxes[0].text;
tt[1] = testBoxes[1].text;
tt[2] = testBoxes[2].text;
userData = new LoadVars();
userData.out = tt;
userData.send("form.php", "", "post");
}
I create a flash form which contains TextInput components. The number, position, name, label of these compnents are defined in an XML file. With actionscript I process the XML and create new components and put them in an array.
Everything works fine except that I can't find a good way to send user inputs to a php script. If I collect the values in an array and pass it to loadvars than it converts the array to a comma separated string. But what if the user enters a comma in the textfield. I want to allow this but in this case I can't rebuild the array in PHP. See my submit code below.
How can I solve this problem?
Thanks!
function submit() {
var tt = new Array();
tt[0] = testBoxes[0].text;
tt[1] = testBoxes[1].text;
tt[2] = testBoxes[2].text;
userData = new LoadVars();
userData.out = tt;
userData.send("form.php", "", "post");
}