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 - 21 Jul 2006 06:44 GMT
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 - 21 Jul 2006 12:29 GMT
micahkoga,
thanks for the info & link --
AMFPHP is the last piece I or we all need..
Alex