Hello again,
Thanks for pointing out that missing semi-colon in the PHP
script. Don't know how I missed that? Anyway, I would like to point
you to an example I made which uses most of your Actionscript and
my PHP code I showed you above.
I would like to tell you that there is a major difference
between testing within the Flash IDE and thru the browser. If I
test locally, saving my FLA under my localhost directory(via
Apache), and use Flash to test for trace statements - I'm only ever
going to get one result because Flash doesn't cache the SWF file.
It doesn't matter how many records you add to the database or how
many changes you make to your PHP file, the SWF will not cache if
you try and view it thru Flash. Therefore each time you hit Test
Movie, you'll see the same result over an over again.
The best way to view and test your movie is thru the browser.
If you have a local set-up like I do (I use Wampserver), then open
your browser, turn your server on, and view the HTML file of your
published Flash movie that way (mine is
http://localhost/FLASH/Fetch.html).
Place a dynamic textbox on stage and output the results to this
textbox, rather than trace statements. Do your Flash/PHP testing
this way - not thru the IDE.
Take a look at the example I've created and you'll see that
the results are generated as you've requested. This data is live
from a MySQL database online where I've used the same entry names
in my table as yours. Apart from the missing semicolon I haven't
changed a thing in the PHP script I provided. The actionscript is
the same as yours in the Flash file. If you need to you can
download the files and take a look.
Online example:
http://www.5degrees.co.nz/tests/Fetch.html
The ExtVarsTest.php file:
http://www.5degrees.co.nz/tests/ExtVarsTest.php
Download Files:
http://www.5degrees.co.nz/tests/Fetch.zip