Hello Everybody!
I 'm Phusa. I 've read a tutorial about Flash, PHP and MySQL Integration.
I imitated that tutorial, but I will unsuccess.
All files I written as follows:
- DataBase Name: dbtestflash
- Table Name: sites
- PHP file Code:
<?php
mysql_pconnect ("localhost","root","");
mysql_select_db ("dbtestflash");
$qResult = mysql_query ("SELECT * FROM sites ORDER BY id ASC");
$nRows = mysql_num_rows($qResult);
$rString ="&n=".$nRows;
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .="&id".$i."=".$row['id']."&"."&title".$i."=".$row['title']."&"."&link".$i."=http://".$row['link']."&";
}
echo $rString."&";
?>
- AS file Code:
[AS]
function lv(l, n, t, e, f) {
if (l == undefined) {
l = new LoadVars();
l.onLoad = function() {
var i;
n.htmlText = “”;
if (t == undefined) {
n.htmlText += “<b>”+this[“title”+e]+"</b><br>";
} else {
for (i=0; i<this.n; i++) {
n.htmlText += “<class=‘menu_item’><a href=’”+this[“link”+i]+"’>"+this[“title”+i]+"</a><br>";
}
}
};
}
l.load(f);
}
lv(sites_txt, “cycle”, null, “sites.php”);[/AS]
Please help me!