I am working on the following tutorial
[SIZE=4][COLOR=#003366]Flash[/COLOR][/SIZE][FONT=Verdana][SIZE=4][COLOR=#003366], PHP, and MySQL Integration[/COLOR][/SIZE][/FONT]
[FONT=Verdana][SIZE=1][COLOR=#666666]by Ben Smith, a.k.a Ωmega: 12th May 2005[/COLOR][/SIZE][/FONT]
and I believe I followed the procedure and the notes by the author. However, it does not display the output in swf. And when I checked it in the php output, the following is displayed:
&n=12&id0=3&&title0=Canned Laughter&&link0=http://www.cannedlaughter.net&&id1=4&&title1=Voetsjoeba&&link1=http://www.voetsjoeba.com&&id2=5&&title2=Kirupa&&link2=http://www.kirupa.com&&id3=6&&title3=Spoono&&link3=http://www.spoono.com&&id4=7&&title4=ReadyMadeMag&&link4=http://www.readymademag.com&&id5=9&&title5=Weebl and Bob&&link5=http://www.weebl.jolt.co.uk&&id6=10&&title6=netbuddies&&link6=http://www.aamukaste.org&&id7=12&&title7=Flip Flop Flyin’&&link7=http://www.flipflopflyin.com&&id8=15&&title8=KirupaForum&&link8=http://www.kirupaforum.com&&id9=16&&title9=Razyr&&link9=http://www.razyr.com/blog&&id10=17&&title10=Senocular&&link10=http://senocular.com&&id11=18&&title11=May 1st Reboot&&link11=http://www.may1reboot.com&&
the php code (sites.php) is
<?php
mysql_pconnect ("localhost", "myusername", "mypassword");
mysql_select_db ("sites");
$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."&";
?>
While the actionscript code (sites.as) is:
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 += "<a href='"+this["link"+i]+"'>"+this["title"+i]+"</a><br>";
}
}
};
}
l.load(f);
}
lv(sites_txt, "cycle", null, "sites.php");
What seems to be wrong?