Groups | Blog | Home
all groups > flash data integration > july 2006 >

flash data integration : Php - Data - Flash


lunchBoxCoder
7/20/2006 12:00:00 AM
Hi all,
this is my first post I'm a newbee teaching myself, so i hope I'm Clear

I have No problems inserting data from flash to PHP into MySQL,
it's sendind them back properlly.

All I'd like to see happen is for one row of data to be inserted into a
dynamic text field.

here's what i've got


if i access this php file, it prints out a vertical list from a single MySQL
row,
I was happy.


$query = "select row from table";
$result = mysql_query($query, $db);

while($row = mysql_fetch_row($result))
{
print "$row[0]<BR>\n";
}


From flash :
I created a dynamic text field w/ an instance, my_to.

var lv:LoadVars = new LoadVars();
lv.load ("data.php");
lv.onLoad = function(){
my_to.text = lv;
}

and Instead of the vertical list (which i would love to see) i get an unparsed
data array.

I can't imagine i'm to far off,
what am I missing?
I hope not alot

Alex
micahkoga
7/21/2006 12:00:00 AM
You should use amfphp. It's flash remoting with php. It's much cleaner
integration. http://www.amfphp.org

Otherwise, to use loadvars, you have to export your data from php like this:
"name1=$row[0]&name2=$row[1]..."

then in flash use: lv.name1 will equal $row[0]
lunchBoxCoder
7/21/2006 12:00:00 AM
micahkoga,
thanks for the info & link --
AMFPHP is the last piece I or we all need..

Alex

AddThis Social Bookmark Button