Hello I have a problem: I have a database(mysql) with the following fields:
test, descr, title
I want to display them into a flash file.
Now my php file called list.php (which collect the information from my database) is the following:
<?php
include_once '../library/config.php';
include_once '../library/opendb.php';
$query =mysql_query("SELECT * FROM `$table` ORDER BY(`title`DESC ");
$cant=0 ;
while($row=mysql_fetch_array($query)){
echo "$cant=$row[title]&$cant=$row[descr]&$cant=$row[test]";
$cant++;
}
echo "cant=$cant";
?>
My flash file has 3 input dynamic text (to display the database)called titletx, descrtx, testx.
and I put an actionscript code to call the php file into my flash file here it is:
myData = new LoadVars()
myData.load("www.ilgerss.it/mazzi/list.php")
myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
titletx.text = this.title
descrtx.text = this.descr
testx.text = this.test
}
}
else
trace("Error loading data")
}
everything is in one fotogramma: the input dynamic text and the actionscript code.
Can anyone be so kind to tell me why this code do not work? or have any suggestion?
Thanks
Pa.