# Php to dynamic text...¡help!

**URL:** <https://forum.kirupa.com/t/php-to-dynamic-text-help/206821>\
**Category:** Uncategorized\
**Created:** [November 11, 2006, 9:37pm UTC](https://forum.kirupa.com/t/php-to-dynamic-text-help/206821 "2006-11-11T21:37:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![openface](https://avatars.discourse-cdn.com/v4/letter/o/5f8ce5/32.png) [@openface](https://forum.kirupa.com/u/openface)\
**Post date:** [November 11, 2006, 9:37pm UTC](https://forum.kirupa.com/t/php-to-dynamic-text-help/206821/1 "2006-11-11T21:37:30Z")

</div>

hi, i’ve been pulling my hair out over this for some time… first off, let it be known that i’m not so much a programmer as a designer. nonetheless, i can weave through code. so, i’ve been trying to update a site that i took over that already had php code written. i am trying to take some of that php code and run it into a dynamic text field inside of a movie clip called ‘linkorgy’. the var name for the text field is ‘textbox’. i’m not sure if the problem is php or flash, but the php pulls up a white screen, and the flash bit in output returns undefined.  
here’s the php bit that i co-opted that works outside of flash:

\<?php  
$db = mysql\_connect(“dbxx”, “dboxx”, “xxx”);  
mysql\_select\_db(“dbxx”);  
$sql = ‘SELECT \* FROM `htmini` WHERE 1 ORDER BY `id` DESC LIMIT 0 , 10’;  
$links = mysql\_query($sql);  
$totalViewable=mysql\_num\_rows($links);  
for($i=0; $i\<$totalViewable; $i++){  
$link = mysql\_fetch\_array($links);  
echo ‘\<li\>\<a href="’.$link[‘url’].’"\>’.$link[‘title’].’\</a\>\</li\>’;  
}  
mysql\_close($db);  
?\>

here’s me trying to fix the code so flash pulls it in:

\<?php  
$db = mysql\_connect(“dbxx”, “dboxx”, “xxx”);  
mysql\_select\_db(“dbxx”);  
$sql = ‘SELECT \* FROM `htmini` WHERE 1 ORDER BY `id` DESC LIMIT 0 , 10’;  
$links = mysql\_query($sql);  
$totalViewable=mysql\_num\_rows($links);  
for($i=0; $i\<$totalViewable; $i++){  
$link = mysql\_fetch\_array($links);  
‘linkorgy=’.urlencode(’\<li\>\<a href="’.$link[‘url’].’"\>’.$link[‘title’].’\</a\>\</li\>’);  
}  
mysql\_close($db);  
?\>

here’s one more feeble try:

\<?php  
$db = mysql\_connect(“dbxx”, “dboxx”, “xxx”);  
mysql\_select\_db(“dbxx”);  
$sql = ‘SELECT \* FROM `htmini` WHERE 1 ORDER BY `id` DESC LIMIT 0 , 10’;  
$links = “”;  
$links = mysql\_query($sql);  
$totalViewable=mysql\_num\_rows($links);  
for($i=0; $i\<$totalViewable; $i++){  
$link = mysql\_fetch\_array($links);  
link1=’\<li\>\<a href="’.$link[‘url’].’"\>’.$link[‘title’].’\</a\>\</li\>’;  
}  
echo ‘linkorgy=’.urlencode("\<font size=“14”\>\<b\>linkorgy\</b\>\</font\>\<br\>\<br\>$links");  
mysql\_close($db);  
?\>

and here’s the AS i have on a blank frame:

var lv:LoadVars = new LoadVars();  
lv.onLoad = function (success) {  
if(success){  
trace(lv.textbox);  
}else{  
trace(“failed to load”);  
}  
}  
lv.load(“linkorgy.php”);

what am i doing wrong? using flash 8 and AS 2.0

any help would be greatly appreciated. this is all for a kind of crazy looking group posting site called ‘[happytedium.com](http://happytedium.com)’. thank you so much for your help, whomever you are.
