# Php Tutorial Output Is Blank In Swf

**URL:** <https://forum.kirupa.com/t/php-tutorial-output-is-blank-in-swf/240355>\
**Category:** flash\
**Created:** [October 2, 2007, 9:45am UTC](https://forum.kirupa.com/t/php-tutorial-output-is-blank-in-swf/240355 "2007-10-02T09:45:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![taurus5\_6](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@taurus5\_6](https://forum.kirupa.com/u/taurus5_6)\
**Post date:** [October 2, 2007, 9:45am UTC](https://forum.kirupa.com/t/php-tutorial-output-is-blank-in-swf/240355/1 "2007-10-02T09:45:22Z")

</div>

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]

> **[kirupa.com - Flash, PHP, and MySQL Integration](https://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm)**
>
> Learn how to take data from a MySQL db, process it in PHP, and display it in Flash.

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](http://www.cannedlaughter.net)&&id1=4&&title1=Voetsjoeba&&link1=[http://www.voetsjoeba.com](http://www.voetsjoeba.com)&&id2=5&&title2=Kirupa&&link2=[http://www.kirupa.com](http://www.kirupa.com)&&id3=6&&title3=Spoono&&link3=[http://www.spoono.com](http://www.spoono.com)&&id4=7&&title4=ReadyMadeMag&&link4=[http://www.readymademag.com](http://www.readymademag.com)&&id5=9&&title5=Weebl and Bob&&link5=[http://www.weebl.jolt.co.uk](http://www.weebl.jolt.co.uk)&&id6=10&&title6=netbuddies&&link6=[http://www.aamukaste.org](http://www.aamukaste.org)&&id7=12&&title7=Flip Flop Flyin’&&link7=[http://www.flipflopflyin.com](http://www.flipflopflyin.com)&&id8=15&&title8=KirupaForum&&link8=[http://www.kirupaforum.com](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](http://www.razyr.com/blog&&id10=17&&title10=Senocular&&link10=http://senocular.com&&id11=18&&title11=May) 1st Reboot&&link11=[http://www.may1reboot.com](http://www.may1reboot.com)&&

the php code (sites.php) is

```php
<?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 .="&amp;id".$i."=".$row['id']."&"."&title".$i."=".$row['title']."&"."&link".$i."=http://".$row['link']."&";
}
echo $rString."&";
?>

```

While the actionscript code (sites.as) is:

```auto
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?
