/    Sign up×
Community /Pin to ProfileBookmark

flash php actionscript

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.

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @paolazi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...