# Loading php data to flash

**URL:** https://forum.kirupa.com/t/loading-php-data-to-flash/1731
**Category:** Uncategorized
**Created:** [May 31, 2002, 7:47pm UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731 "2002-05-31T19:47:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 31, 2002, 7:47pm UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731/1 "2002-05-31T19:47:06Z")

</div>

If any one has any ideas on this…\r\rI’m trying to load an array from php to flash that the data is shown in a scrollable window…\r\rI created a dynmaic txt box and attached a scroller to it… the txt box has a name called content… How can I get the output of the php file into the text field… \r\rheres the php code\r\r\<?php\r\r$server=“localhost”;\r$user=“mysql”;\r$pswd="";\r$dbbase=“test”;\r\r$hookup = mysql\_connect($server, $user, $pswd);\r\rmysql\_select\_db($dbbase,$hookup);\r\r$result = mysql\_query(“SELECT \* FROM setlist”,$hookup);\r\r$nrows = mysql\_num\_rows($result);\r$rString = “n=”.$nrows;\r\rfor ($i=0; $i \< $nrows; $i++) {\r $row = mysql\_fetch\_array($result);\r $rString .= “&date”.$i."=".$row[‘date’];\r $rString .= “&venue”.$i."=".$row[‘venue’]."&cityst".$i."=".$row[‘cityst’];\r $rString .= “&set1”.$i."=".$row[‘set1’]."&notes".$i."=".$row[‘notes’]."&recorded".$i."=".$row[‘recorded’];\r}\recho $rString;\r\r?\>\r\ror is there a better way to get data out mf mysql db and so the data is in a nice layed out format where all the data is scrollable… I hope I made sense of what my brain was trying to say.\rthanks in advance for any and all help

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 1, 2002, 8:00pm UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731/2 "2002-06-01T20:00:59Z")

</div>

As the php gurus dwell somewhere else, try posting this on the forum at [www.phpforflash.com](http://www.phpforflash.com) …sometimes they answer 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 2, 2002, 3:34pm UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731/3 "2002-06-02T15:34:22Z")

</div>

I tried that board… my php code is fine according to others out there, I still cant get the data to show up in flash at all\r\rheres the actionscript I’m using…\r\r\r var i;\r content.htmlText = “”;\r for (i=0; i\<this.n; i++) {\r content.htmlText += "&nbsp;&nbsp;“+this[“venue”+i]+” “+this[“cityst”+i]+”";\r content.htmlText += "&nbsp;&nbsp;“+this[“set1”+i]+”";\r content.htmlText += "&nbsp;&nbsp;“+this[“notes”+1]+” “+this[“recorded”+i]+”";\r }

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 3, 2002, 6:02pm UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731/4 "2002-06-03T18:02:06Z")

</div>

Shouldn’t you address your text area like this:\r\_root.movieClip.textName.text = “something”;\r\rSo, in your case:\r\*\* \_root. **content.htmlText**.text\*\* += “\_\_”+this[“set1”+i]+"";\r\r\rThe \_root is optional, but have you tried as a test:\rcontent.htmlText = “something simple”;\r\r

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 4, 2002, 4:33am UTC](https://forum.kirupa.com/t/loading-php-data-to-flash/1731/5 "2002-06-04T04:33:48Z")

</div>

If your PHP is ok, why post it?\rWhat debugging measures have you taken?\rTried displaying the retrieved info in an html page?\rTried hardcoding a value to be displayed to see if anything at all shows up?\rand so on…(trace, breakpoints…)\r\rIt’s a bit difficult to debug s’thing without seeing the whole structure, maybe you try to display the data before it’s loaded in, maybe…?!
